simplify the packetHandlerManager interface

This commit is contained in:
Marten Seemann 2019-11-03 09:01:17 +07:00
parent 9cbbdaa7b3
commit 36c77a56c9
2 changed files with 9 additions and 13 deletions

View file

@ -72,6 +72,14 @@ func (p *receivedPacket) Clone() *receivedPacket {
}
}
type sessionRunner interface {
Retire(protocol.ConnectionID)
Remove(protocol.ConnectionID)
ReplaceWithClosed(protocol.ConnectionID, packetHandler)
AddResetToken([16]byte, packetHandler)
RemoveResetToken([16]byte)
}
type handshakeRunner struct {
onReceivedParams func([]byte)
onError func(error)