part

package
v0.5.26 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 11 Imported by: 2

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
	SendChan chan interface{}
	RecvChan chan []byte

	TO     int
	Header map[string]string
	Proxy  string

	Ping Ping

	Msg_normal_close  string
	Func_normal_close func()
	Func_abort_close  func()
	// contains filtered or unexported fields
}

func New_client

func New_client(config Client) (o *Client)

func (*Client) Close

func (o *Client) Close()

func (*Client) Error

func (o *Client) Error() error

func (*Client) Handle

func (i *Client) Handle() (o *Client)

func (*Client) Heartbeat

func (o *Client) Heartbeat() (err error)

func (*Client) Isclose

func (o *Client) Isclose() bool

type Ping

type Ping struct {
	Msg    []byte
	Period int
	// contains filtered or unexported fields
}

type Server added in v0.3.9

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

func New_server added in v0.3.9

func New_server() *Server

func (*Server) Interface added in v0.3.9

func (t *Server) Interface() *mq.Msgq
			ws_mq.Push_tag(`send`,Uinterface{//just reply
				Id:tmp.Id,
				Data:tmp.Data,
			})
			//or
			ws_mq.Push_tag(`send`,Uinterface{//just reply
				Id:0,//send to all
				Data:tmp.Data,
			})
		}
		return false
	},
	`error`:func(data interface{})(bool){
		log.Println(data)
		return false
	},
})

func (*Server) Len added in v0.3.9

func (t *Server) Len() uint

func (*Server) WS added in v0.3.9

func (t *Server) WS(w http.ResponseWriter, r *http.Request) (o chan uintptr)

type Uinterface added in v0.3.9

type Uinterface struct {
	Id   uintptr
	Data []byte
}

Jump to

Keyboard shortcuts

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