Versions in this module Expand all Collapse all v1 v1.8.5 Sep 3, 2023 Changes in this version + const Active + const Expiring + const Initializing + const OptionData + const OptionError + var XUDPManager struct + func NewStreamReader(reader *buf.BufferedReader) buf.Reader + type ClientManager struct + Enabled bool + Picker WorkerPicker + func (m *ClientManager) Dispatch(ctx context.Context, link *transport.Link) error + type ClientStrategy struct + MaxConcurrency uint32 + MaxConnection uint32 + type ClientWorker struct + func NewClientWorker(stream transport.Link, s ClientStrategy) (*ClientWorker, error) + func (m *ClientWorker) ActiveConnections() uint32 + func (m *ClientWorker) Closed() bool + func (m *ClientWorker) Dispatch(ctx context.Context, link *transport.Link) bool + func (m *ClientWorker) IsClosing() bool + func (m *ClientWorker) IsFull() bool + func (m *ClientWorker) TotalConnections() uint32 + type ClientWorkerFactory interface + Create func() (*ClientWorker, error) + type DialingWorkerFactory struct + Dialer internet.Dialer + Proxy proxy.Outbound + Strategy ClientStrategy + func (f *DialingWorkerFactory) Create() (*ClientWorker, error) + type FrameMetadata struct + GlobalID [8]byte + Option bitmask.Byte + SessionID uint16 + SessionStatus SessionStatus + Target net.Destination + func (f *FrameMetadata) Unmarshal(reader io.Reader) error + func (f *FrameMetadata) UnmarshalFromBuffer(b *buf.Buffer) error + func (f FrameMetadata) WriteTo(b *buf.Buffer) error + type IncrementalWorkerPicker struct + Factory ClientWorkerFactory + func (p *IncrementalWorkerPicker) PickAvailable() (*ClientWorker, error) + type PacketReader struct + func NewPacketReader(reader io.Reader, dest *net.Destination) *PacketReader + func (r *PacketReader) ReadMultiBuffer() (buf.MultiBuffer, error) + type Server struct + func NewServer(ctx context.Context) *Server + func (s *Server) Close() error + func (s *Server) Dispatch(ctx context.Context, dest net.Destination) (*transport.Link, error) + func (s *Server) DispatchLink(ctx context.Context, dest net.Destination, link *transport.Link) error + func (s *Server) Start() error + func (s *Server) Type() interface{} + type ServerWorker struct + func NewServerWorker(ctx context.Context, d routing.Dispatcher, link *transport.Link) (*ServerWorker, error) + func (w *ServerWorker) ActiveConnections() uint32 + func (w *ServerWorker) Closed() bool + type Session struct + ID uint16 + XUDP *XUDP + func (s *Session) Close(locked bool) error + func (s *Session) NewReader(reader *buf.BufferedReader, dest *net.Destination) buf.Reader + type SessionManager struct + func NewSessionManager() *SessionManager + func (m *SessionManager) Add(s *Session) bool + func (m *SessionManager) Allocate() *Session + func (m *SessionManager) Close() error + func (m *SessionManager) CloseIfNoSession() bool + func (m *SessionManager) Closed() bool + func (m *SessionManager) Count() int + func (m *SessionManager) Get(id uint16) (*Session, bool) + func (m *SessionManager) Remove(locked bool, id uint16) + func (m *SessionManager) Size() int + type SessionStatus byte + const SessionStatusEnd + const SessionStatusKeep + const SessionStatusKeepAlive + const SessionStatusNew + type TargetNetwork byte + const TargetNetworkTCP + const TargetNetworkUDP + type WorkerPicker interface + PickAvailable func() (*ClientWorker, error) + type Writer struct + func NewResponseWriter(id uint16, writer buf.Writer, transferType protocol.TransferType) *Writer + func NewWriter(id uint16, dest net.Destination, writer buf.Writer, ...) *Writer + func (w *Writer) Close() error + func (w *Writer) WriteMultiBuffer(mb buf.MultiBuffer) error + type XUDP struct + Expire time.Time + GlobalID [8]byte + Mux *Session + Status uint64 + func (x *XUDP) Interrupt()