mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 04:37:36 +03:00
also use the multiplexer for the server
This commit is contained in:
parent
c8d20e86d7
commit
ad5a3e2fa0
15 changed files with 631 additions and 512 deletions
|
@ -28,7 +28,7 @@ type connMultiplexer struct {
|
|||
mutex sync.Mutex
|
||||
|
||||
conns map[net.PacketConn]connManager
|
||||
newPacketHandlerManager func(net.PacketConn, int, utils.Logger, bool) packetHandlerManager // so it can be replaced in the tests
|
||||
newPacketHandlerManager func(net.PacketConn, int, utils.Logger) packetHandlerManager // so it can be replaced in the tests
|
||||
|
||||
logger utils.Logger
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ func (m *connMultiplexer) AddConn(c net.PacketConn, connIDLen int) (packetHandle
|
|||
|
||||
p, ok := m.conns[c]
|
||||
if !ok {
|
||||
manager := m.newPacketHandlerManager(c, connIDLen, m.logger, true)
|
||||
manager := m.newPacketHandlerManager(c, connIDLen, m.logger)
|
||||
p = connManager{connIDLen: connIDLen, manager: manager}
|
||||
m.conns[c] = p
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue