websocket

package
v0.0.0-...-a2ce4e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	api.ClientAdapter
	// contains filtered or unexported fields
}

func Dial

func Dial(rawUrl string, opt api.ClientOption) (*Client, error)

func (*Client) BatchCallJsonRpc

func (c *Client) BatchCallJsonRpc(b []api.BatchElem) error

func (*Client) CallJsonRpc

func (c *Client) CallJsonRpc(result interface{}, method string, args interface{}) error

func (*Client) Close

func (c *Client) Close() error

func (*Client) ErrFromWS

func (c *Client) ErrFromWS() chan error

func (*Client) GetType

func (c *Client) GetType() api.ClientType

func (*Client) WriteByWs

func (c *Client) WriteByWs(msg api.WSMessage) error

type Context

type Context struct {
	ctx.ContextAdapter
	// contains filtered or unexported fields
}

func (*Context) ClientIP

func (ctx *Context) ClientIP() string

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(ctx *gin.Context, opts ...WsOption) (*Server, error)

func (*Server) Close

func (s *Server) Close()

func (*Server) Run

func (s *Server) Run()

type WsOption

type WsOption func(opt *wsOption)

func WithRawHandle

func WithRawHandle(handle api.RawWsHandle) WsOption

func WithRpcServer

func WithRpcServer(s *jsonrpc.Server) WsOption

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL