コード例 #1
0
ファイル: dispatcher.go プロジェクト: zzragida/goquic
func CreateQuicDispatcher(writer *ServerWriter, createQuicServerSession func() IncomingDataStreamCreator, taskRunner *TaskRunner, cryptoConfig *ServerCryptoConfig) *QuicDispatcher {
	dispatcher := &QuicDispatcher{
		quicServerSessions:      make(map[*QuicServerSession]bool),
		TaskRunner:              taskRunner,
		createQuicServerSession: createQuicServerSession,
	}

	dispatcher.quicDispatcher = C.create_quic_dispatcher(unsafe.Pointer(writer), unsafe.Pointer(dispatcher), unsafe.Pointer(taskRunner), cryptoConfig.serverCryptoConfig)
	return dispatcher
}
コード例 #2
0
ファイル: dispatcher.go プロジェクト: horiga/goquic
func CreateQuicDispatcher(writer *ServerWriter, createQuicServerSession func() DataStreamCreator, taskRunner *TaskRunner, proofSource ProofSource, isSecure bool) *QuicDispatcher {
	dispatcher := &QuicDispatcher{
		quicServerSessions:      make(map[*QuicServerSession]bool),
		TaskRunner:              taskRunner,
		createQuicServerSession: createQuicServerSession,
		proofSource:             proofSource,
		isSecure:                isSecure,
	}

	dispatcher.quicDispatcher = C.create_quic_dispatcher(unsafe.Pointer(writer), unsafe.Pointer(dispatcher), unsafe.Pointer(taskRunner))
	return dispatcher
}