Documentation
¶
Index ¶
- func NewUdpSessionFullCone(ctx context.Context, src net.Destination, cancelCause context.CancelCauseFunc, ...) *udpSessionFullCone
- func NewUdpSessionSymetric(ctx context.Context, src net.Destination, dst net.Destination, ...) *udpSessionSymetric
- type SessionManager
- type UDPSessionCommon
- type UdpSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUdpSessionFullCone ¶
func NewUdpSessionFullCone(ctx context.Context, src net.Destination, cancelCause context.CancelCauseFunc, responseWriter responseWriter, requestChan chan *udp.Packet) *udpSessionFullCone
func NewUdpSessionSymetric ¶
func NewUdpSessionSymetric(ctx context.Context, src net.Destination, dst net.Destination, cancelCause context.CancelCauseFunc, responseWriter responseWriter, pipe *pipe.Pipe) *udpSessionSymetric
Types ¶
type SessionManager ¶
func NewManager ¶
func NewManager() *SessionManager
func (*SessionManager) AddUdpSession ¶
func (u *SessionManager) AddUdpSession(src net.Destination, s UdpSession)
func (*SessionManager) Close ¶
func (u *SessionManager) Close()
func (*SessionManager) CloseAndRemoveUdpSession ¶
func (u *SessionManager) CloseAndRemoveUdpSession(src net.Destination)
func (*SessionManager) GetUdpSession ¶
func (u *SessionManager) GetUdpSession(src net.Destination) (s UdpSession, found bool)
func (*SessionManager) Start ¶
func (u *SessionManager) Start()
type UDPSessionCommon ¶
type UDPSessionCommon struct {
Ctx context.Context
Src net.Destination
CancelCause context.CancelCauseFunc
Ipv4 bool
Time time.Time
CloseOnce sync.Once
}
func (*UDPSessionCommon) HasTimeout ¶
func (u *UDPSessionCommon) HasTimeout() bool
type UdpSession ¶
Click to show internal directories.
Click to hide internal directories.