Versions in this module Expand all Collapse all v1 v1.0.1 Oct 31, 2023 v1.0.0 Oct 31, 2023 Changes in this version + type Conn interface + ClientIP func() string + Close func() error + Conn func() *websocket.Conn + FD func() int64 + Host func() string + LastPing func() time.Time + Name func() string + Ping func() error + Pong func() error + Request func() *http.Request + Response func() http.ResponseWriter + SetDeadline func(t time.Time) error + SetFD func(int64) + SetLastPing func(time.Time) + SetName func(name string) + SubProtocols func() []string + Write func(messageType int, msg []byte) (int, error) + type Middle router.Middle[*socket.Stream[Conn]] + type Server struct + Addr string + CertFile string + CheckOrigin func(r *http.Request) bool + DailTimeout time.Duration + HandshakeTimeout time.Duration + HeartBeatInterval time.Duration + HeartBeatTimeout time.Duration + IdleTimeout time.Duration + KeyFile string + MaxHeaderBytes int + Name string + OnClose func(conn Conn) + OnError func(stream *socket.Stream[Conn], err error) + OnException func(err error) + OnMessage func(conn Conn, msg []byte) + OnOpen func(conn Conn) + OnRaw func(w http.ResponseWriter, r *http.Request) + OnSuccess func() + OnUnknown func(conn Conn, message []byte, next Middle) + Path string + PingHandler func(conn Conn) func(data string) error + PongHandler func(conn Conn) func(data string) error + ReadBufferSize int + ReadHeaderTimeout time.Duration + ReadTimeout time.Duration + SubProtocols []string + TLSConfig *tls.Config + WriteBufferSize int + WriteTimeout time.Duration + func (s *Server[T]) Conn(fd int64) (Conn, error) + func (s *Server[T]) ConnLen() int + func (s *Server[T]) GetDailTimeout() time.Duration + func (s *Server[T]) GetRouter() *router.Router[*socket.Stream[Conn], T] + func (s *Server[T]) LocalAddr() net.Addr + func (s *Server[T]) Range(fn func(conn Conn)) + func (s *Server[T]) Ready() + func (s *Server[T]) Sender(fd int64) (socket.Emitter[Conn], error) + func (s *Server[T]) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (s *Server[T]) SetRouter(router *router.Router[*socket.Stream[Conn], T]) *Server[T] + func (s *Server[T]) Shutdown() error + func (s *Server[T]) Start() + func (s *Server[T]) Use(middle ...func(next Middle) Middle)