Documentation ¶
Index ¶
- type EventHandler
- type Listener
- type PacketAddress
- type PacketData
- type PacketSession
- func (s *PacketSession) Address() net.Addr
- func (s *PacketSession) Close() error
- func (s *PacketSession) HandleControlMsg(controlType xgress.ControlType, headers channel2.Headers, ...) error
- func (s *PacketSession) LogContext() string
- func (s *PacketSession) MarkActivity()
- func (s *PacketSession) QueueRead(data []byte)
- func (s *PacketSession) ReadPayload() ([]byte, map[uint8][]byte, error)
- func (s *PacketSession) SessionId() string
- func (s *PacketSession) SetState(state SessionState)
- func (s *PacketSession) State() SessionState
- func (s *PacketSession) TimeoutNanos() int64
- func (s *PacketSession) Write(p []byte) (n int, err error)
- func (s *PacketSession) WritePayload(p []byte, _ map[uint8][]byte) (n int, err error)
- type Session
- type SessionState
- type SessionUpdateEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventHandler interface {
Handle(listener Listener)
}
type PacketAddress ¶
type PacketAddress struct {
// contains filtered or unexported fields
}
func Parse ¶
func Parse(s string) (*PacketAddress, error)
func (*PacketAddress) Address ¶
func (pa *PacketAddress) Address() string
func (*PacketAddress) Network ¶
func (pa *PacketAddress) Network() string
func (*PacketAddress) String ¶
func (pa *PacketAddress) String() string
type PacketData ¶
func NewPacketData ¶
func NewPacketData(buffer []byte, source net.Addr) *PacketData
type PacketSession ¶
type PacketSession struct {
// contains filtered or unexported fields
}
func (*PacketSession) Address ¶
func (s *PacketSession) Address() net.Addr
func (*PacketSession) Close ¶
func (s *PacketSession) Close() error
func (*PacketSession) HandleControlMsg ¶ added in v0.16.114
func (s *PacketSession) HandleControlMsg(controlType xgress.ControlType, headers channel2.Headers, responder xgress.ControlReceiver) error
func (*PacketSession) LogContext ¶
func (s *PacketSession) LogContext() string
func (*PacketSession) MarkActivity ¶
func (s *PacketSession) MarkActivity()
func (*PacketSession) QueueRead ¶
func (s *PacketSession) QueueRead(data []byte)
func (*PacketSession) ReadPayload ¶
func (s *PacketSession) ReadPayload() ([]byte, map[uint8][]byte, error)
func (*PacketSession) SessionId ¶
func (s *PacketSession) SessionId() string
func (*PacketSession) SetState ¶
func (s *PacketSession) SetState(state SessionState)
func (*PacketSession) State ¶
func (s *PacketSession) State() SessionState
func (*PacketSession) TimeoutNanos ¶
func (s *PacketSession) TimeoutNanos() int64
func (*PacketSession) WritePayload ¶
type Session ¶
type Session interface { xgress.Connection State() SessionState SetState(state SessionState) Address() net.Addr Write(data []byte) (n int, err error) QueueRead(data []byte) TimeoutNanos() int64 MarkActivity() SessionId() string }
type SessionState ¶
type SessionState uint8
const ( SessionStateNew SessionState = iota SessionStateEstablished )
type SessionUpdateEvent ¶
type SessionUpdateEvent PacketSession
func (*SessionUpdateEvent) Handle ¶
func (s *SessionUpdateEvent) Handle(_ Listener)
Click to show internal directories.
Click to hide internal directories.