Documentation ¶
Index ¶
- type Handler
- type WsServer
- func (this *WsServer) BroadcastResult(resp map[string]interface{})
- func (this *WsServer) IsValidMsg(reqMsg map[string]interface{}) bool
- func (this *WsServer) OnDataHandle(curSession *session.Session, bysMsg []byte, r *http.Request) bool
- func (this *WsServer) PushTxResult(txHashStr string, resp map[string]interface{})
- func (this *WsServer) Restart()
- func (this *WsServer) SetTxHashMap(txhash string, sessionid string)
- func (this *WsServer) Start() error
- func (this *WsServer) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WsServer ¶
type WsServer struct { sync.RWMutex Upgrader websocket.Upgrader SessionList *session.SessionList ActionMap map[string]Handler TxHashMap map[string]string //key: txHash value:sessionid BroadcastMap map[string]string // contains filtered or unexported fields }
func InitWsServer ¶
func InitWsServer() *WsServer
func (*WsServer) BroadcastResult ¶
func (*WsServer) IsValidMsg ¶
func (*WsServer) OnDataHandle ¶
func (*WsServer) PushTxResult ¶
func (*WsServer) SetTxHashMap ¶
Click to show internal directories.
Click to hide internal directories.