Versions in this module Expand all Collapse all v0 v0.7.2 Apr 16, 2020 v0.7.1 Apr 9, 2020 Changes in this version + const WSTOPIC_EVENT + const WSTOPIC_JSON_BLOCK + const WSTOPIC_RAW_BLOCK + const WSTOPIC_TXHASHS + type Handler struct + type WsServer struct + ActionMap map[string]Handler + SessionList *session.SessionList + SubscribeMap map[string]subscribe + TxHashMap map[string]string + Upgrader websocket.Upgrader + func InitWsServer() *WsServer + func (self *WsServer) BroadcastToSubscribers(contractAddrs map[string]bool, sub int, resp map[string]interface{}) + func (self *WsServer) InsertTxHashMap(txhash string, sessionid string) + func (self *WsServer) IsValidMsg(reqMsg map[string]interface{}) bool + func (self *WsServer) OnDataHandle(curSession *session.Session, bysMsg []byte, r *http.Request) bool + func (self *WsServer) PushTxResult(contractAddrs map[string]bool, txHashStr string, resp map[string]interface{}) + func (self *WsServer) Restart() + func (self *WsServer) Start() error + func (self *WsServer) Stop()