| 63 | SubscribeBlockTxHashs bool `json:"SubscribeBlockTxHashs"` |
| 64 | } |
| 65 | type WsServer struct { |
| 66 | sync.RWMutex |
| 67 | Upgrader websocket.Upgrader |
| 68 | listener net.Listener |
| 69 | server *http.Server |
| 70 | SessionList *session.SessionList // websocket sesseionlist |
| 71 | ActionMap map[string]Handler //handler functions |
| 72 | TxHashMap map[string]string //key: txHash value:sessionid |
| 73 | SubscribeMap map[string]subscribe //key: sessionId value:subscribeInfo |
| 74 | } |
| 75 | |
| 76 | //init websocket server |
| 77 | func InitWsServer() *WsServer { |
nothing calls this directly
no outgoing calls
no test coverage detected