mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-05 05:07:36 +03:00
remove unused unknownPacketHandler interface (#4093)
This commit is contained in:
parent
22fb59ee6f
commit
9010cfd2bb
4 changed files with 3 additions and 70 deletions
|
@ -1,58 +0,0 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
|
||||||
// Source: github.com/quic-go/quic-go (interfaces: UnknownPacketHandler)
|
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
|
||||||
package quic
|
|
||||||
|
|
||||||
import (
|
|
||||||
reflect "reflect"
|
|
||||||
|
|
||||||
gomock "go.uber.org/mock/gomock"
|
|
||||||
)
|
|
||||||
|
|
||||||
// MockUnknownPacketHandler is a mock of UnknownPacketHandler interface.
|
|
||||||
type MockUnknownPacketHandler struct {
|
|
||||||
ctrl *gomock.Controller
|
|
||||||
recorder *MockUnknownPacketHandlerMockRecorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockUnknownPacketHandlerMockRecorder is the mock recorder for MockUnknownPacketHandler.
|
|
||||||
type MockUnknownPacketHandlerMockRecorder struct {
|
|
||||||
mock *MockUnknownPacketHandler
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewMockUnknownPacketHandler creates a new mock instance.
|
|
||||||
func NewMockUnknownPacketHandler(ctrl *gomock.Controller) *MockUnknownPacketHandler {
|
|
||||||
mock := &MockUnknownPacketHandler{ctrl: ctrl}
|
|
||||||
mock.recorder = &MockUnknownPacketHandlerMockRecorder{mock}
|
|
||||||
return mock
|
|
||||||
}
|
|
||||||
|
|
||||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
||||||
func (m *MockUnknownPacketHandler) EXPECT() *MockUnknownPacketHandlerMockRecorder {
|
|
||||||
return m.recorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// handlePacket mocks base method.
|
|
||||||
func (m *MockUnknownPacketHandler) handlePacket(arg0 receivedPacket) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
m.ctrl.Call(m, "handlePacket", arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// handlePacket indicates an expected call of handlePacket.
|
|
||||||
func (mr *MockUnknownPacketHandlerMockRecorder) handlePacket(arg0 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handlePacket", reflect.TypeOf((*MockUnknownPacketHandler)(nil).handlePacket), arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// setCloseError mocks base method.
|
|
||||||
func (m *MockUnknownPacketHandler) setCloseError(arg0 error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
m.ctrl.Call(m, "setCloseError", arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// setCloseError indicates an expected call of setCloseError.
|
|
||||||
func (mr *MockUnknownPacketHandlerMockRecorder) setCloseError(arg0 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "setCloseError", reflect.TypeOf((*MockUnknownPacketHandler)(nil).setCloseError), arg0)
|
|
||||||
}
|
|
|
@ -62,9 +62,6 @@ type QUICConn = quicConn
|
||||||
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_packet_handler_test.go github.com/quic-go/quic-go PacketHandler"
|
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_packet_handler_test.go github.com/quic-go/quic-go PacketHandler"
|
||||||
type PacketHandler = packetHandler
|
type PacketHandler = packetHandler
|
||||||
|
|
||||||
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_unknown_packet_handler_test.go github.com/quic-go/quic-go UnknownPacketHandler"
|
|
||||||
type UnknownPacketHandler = unknownPacketHandler
|
|
||||||
|
|
||||||
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_packet_handler_manager_test.go github.com/quic-go/quic-go PacketHandlerManager"
|
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_packet_handler_manager_test.go github.com/quic-go/quic-go PacketHandlerManager"
|
||||||
type PacketHandlerManager = packetHandlerManager
|
type PacketHandlerManager = packetHandlerManager
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import (
|
||||||
"crypto/hmac"
|
"crypto/hmac"
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"errors"
|
|
||||||
"hash"
|
"hash"
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
|
@ -45,13 +44,6 @@ type closePacket struct {
|
||||||
info packetInfo
|
info packetInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
type unknownPacketHandler interface {
|
|
||||||
handlePacket(receivedPacket)
|
|
||||||
setCloseError(error)
|
|
||||||
}
|
|
||||||
|
|
||||||
var errListenerAlreadySet = errors.New("listener already set")
|
|
||||||
|
|
||||||
type packetHandlerMap struct {
|
type packetHandlerMap struct {
|
||||||
mutex sync.Mutex
|
mutex sync.Mutex
|
||||||
handlers map[protocol.ConnectionID]packetHandler
|
handlers map[protocol.ConnectionID]packetHandler
|
||||||
|
|
|
@ -16,6 +16,8 @@ import (
|
||||||
"github.com/quic-go/quic-go/logging"
|
"github.com/quic-go/quic-go/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var errListenerAlreadySet = errors.New("listener already set")
|
||||||
|
|
||||||
// The Transport is the central point to manage incoming and outgoing QUIC connections.
|
// The Transport is the central point to manage incoming and outgoing QUIC connections.
|
||||||
// QUIC demultiplexes connections based on their QUIC Connection IDs, not based on the 4-tuple.
|
// QUIC demultiplexes connections based on their QUIC Connection IDs, not based on the 4-tuple.
|
||||||
// This means that a single UDP socket can be used for listening for incoming connections, as well as
|
// This means that a single UDP socket can be used for listening for incoming connections, as well as
|
||||||
|
@ -91,7 +93,7 @@ type Transport struct {
|
||||||
// If no ConnectionIDGenerator is set, this is set to a default.
|
// If no ConnectionIDGenerator is set, this is set to a default.
|
||||||
connIDGenerator ConnectionIDGenerator
|
connIDGenerator ConnectionIDGenerator
|
||||||
|
|
||||||
server unknownPacketHandler
|
server *baseServer
|
||||||
|
|
||||||
conn rawConn
|
conn rawConn
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue