ws

package
v0.0.0-...-575f8db Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 5 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 {
	Url string
	// contains filtered or unexported fields
}

func (*Client) Connect

func (self *Client) Connect() error

func (*Client) ReadMsg

func (self *Client) ReadMsg(msg interface{}) error

func (*Client) WriteMsg

func (self *Client) WriteMsg(msg interface{}) (err error)

type WsServer

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

func NewWsServer

func NewWsServer(Url string) (*WsServer, error)

func (*WsServer) RegistHandle

func (self *WsServer) RegistHandle(h func(*websocket.Conn))

func (*WsServer) ServeHTTP

func (self *WsServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*WsServer) Start

func (self *WsServer) Start() (err error)

Jump to

Keyboard shortcuts

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