Versions in this module Expand all Collapse all v1 v1.0.0 Oct 31, 2023 Changes in this version + type Client struct + Addr string + CertFile string + DailTimeout time.Duration + Header http.Header + HeartBeat func(conn Conn) error + HeartBeatInterval time.Duration + HeartBeatTimeout time.Duration + KeyFile string + Name string + OnClose func(conn Conn) + OnError func(stream *socket.Stream[Conn], err error) + OnException func(err error) + OnMessage func(conn Conn, messageType int, msg []byte) + OnOpen func(conn Conn) + OnReconnecting func() + OnSuccess func() + OnUnknown func(conn Conn, message []byte, next Middle) + PingHandler func(conn Conn) func(data string) error + PongHandler func(conn Conn) func(data string) error + Protocol protocol.Protocol + ReadBufferSize int + ReconnectInterval time.Duration + Response *http.Response + SubProtocols []string + TLSConfig *tls.Config + WriteBufferSize int + func (c *Client[T]) Close() error + func (c *Client[T]) Conn() Conn + func (c *Client[T]) Connect() + func (c *Client[T]) GetDailTimeout() time.Duration + func (c *Client[T]) GetRouter() *router.Router[*socket.Stream[Conn], T] + func (c *Client[T]) LocalAddr() net.Addr + func (c *Client[T]) RemoteAddr() net.Addr + func (c *Client[T]) Sender() socket.Emitter[Conn] + func (c *Client[T]) SetRouter(router *router.Router[*socket.Stream[Conn], T]) *Client[T] + func (c *Client[T]) Use(middle ...func(Middle) Middle) + type Conn interface + Close func() error + Conn func() *websocket.Conn + LastPong func() time.Time + LocalAddr func() net.Addr + Name func() string + Ping func() error + Pong func() error + Read func() (int, []byte, error) + RemoteAddr func() net.Addr + SetDeadline func(t time.Time) error + SetLastPong func(t time.Time) + SetName func(name string) + SubProtocols func() []string + Write func(messageType int, data []byte) (int, error) + type Middle router.Middle[*socket.Stream[Conn]]