Versions in this module Expand all Collapse all v2 v2.0.7 Dec 18, 2023 Changes in this version + const BAD_HANDSHAKE_METHOD + const BAD_REQUEST + const FORBIDDEN + const OK_REQUEST + const Protocol + const UNKNOWN_SID + const UNKNOWN_TRANSPORT + const UNSUPPORTED_PROTOCOL_VERSION + type BaseServer interface + ApplyMiddlewares func(*types.HttpContext, func(error)) + Cleanup func() + Clients func() *types.Map[string, Socket] + ClientsCount func() uint64 + Close func() BaseServer + ComputePath func(config.AttachOptionsInterface) string + Construct func(any) + CreateTransport func(string, *types.HttpContext) (transports.Transport, error) + GenerateId func(*types.HttpContext) (string, error) + Handshake func(string, *types.HttpContext) (int, transports.Transport) + Init func() + Middlewares func() []Middleware + Opts func() config.ServerOptionsInterface + Proto func() BaseServer + Prototype func(BaseServer) + Upgrades func(string) *types.Set[string] + Use func(Middleware) + Verify func(*types.HttpContext, bool) (int, map[string]any) + func MakeBaseServer() BaseServer + type Middleware func(*types.HttpContext, func(error)) + type Server interface + Attach func(*types.HttpServer, any) + CreateTransport func(string, *types.HttpContext) (transports.Transport, error) + HandleRequest func(*types.HttpContext) + HandleUpgrade func(*types.HttpContext) + HttpServer func() *types.HttpServer + OnWebTransportSession func(*types.HttpContext, *webtransport.Server) + SetHttpServer func(*types.HttpServer) + func Attach(server *types.HttpServer, options any) Server + func Listen(addr string, options any, fn types.Callable) Server + func MakeServer() Server + func New(server any, args ...any) Server + func NewServer(opt any) Server + type Socket interface + Close func(bool) + Construct func(string, BaseServer, transports.Transport, *types.HttpContext, int) + Id func() string + MaybeUpgrade func(transports.Transport) + Protocol func() int + ReadyState func() string + RemoteAddress func() string + Request func() *types.HttpContext + Send func(io.Reader, *packet.Options, func(transports.Transport)) Socket + SetReadyState func(string) + Transport func() transports.Transport + Upgraded func() bool + Upgrading func() bool + Write func(io.Reader, *packet.Options, func(transports.Transport)) Socket + func MakeSocket() Socket + func NewSocket(id string, server BaseServer, transport transports.Transport, ...) Socket