Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Url string TO int // depercated: use RTOMs WTOMs instead RTOMs int WTOMs int BufSize int // msg buf 1: always use single buf >1: use bufs cycle 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 ¶
type Recorder ¶ added in v0.10.0
type Recorder struct { Server *Server // 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
how to use
ws_mq.Pull_tag(map[string]func(interface{})(bool){ `recv`:func(data interface{})(bool){ if tmp,ok := data.(Uinterface);ok { log.Println(tmp.Id,string(tmp.Data)) if string(tmp.Data) == `close` { ws_mq.Push_tag(`close`,Uinterface{//close Id:0,//close all connect }) //or // ws_mq.Push_tag(`close`,Uinterface{//close // Id:tmp.Id,//close this connect // }) return false } 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 }, })
type Uinterface ¶ added in v0.3.9
Click to show internal directories.
Click to hide internal directories.