use a smaller packetHandler interface

The packetHandler interface just needs two methods: one for handling
packets, and one for closing.
This commit is contained in:
Marten Seemann 2018-05-21 09:19:16 +08:00
parent ef34d9e85f
commit b3fd768a61
11 changed files with 147 additions and 142 deletions

View file

@ -45,9 +45,9 @@ var _ = Describe("Session Handler", func() {
})
It("closes", func() {
sess1 := NewMockPacketHandler(mockCtrl)
sess1 := NewMockQuicSession(mockCtrl)
sess1.EXPECT().Close(nil)
sess2 := NewMockPacketHandler(mockCtrl)
sess2 := NewMockQuicSession(mockCtrl)
sess2.EXPECT().Close(nil)
handler.Add(protocol.ConnectionID{1, 1, 1, 1}, sess1)
handler.Add(protocol.ConnectionID{2, 2, 2, 2}, sess2)