Documentation ¶
Index ¶
- Constants
- type DelayedChan
- type Handler
- type WsServer
- func (ws *WsServer) Broadcast(data []byte) error
- func (ws *WsServer) GetClientsById(cliendID []byte) []*session.Session
- func (ws *WsServer) GetNetNode() *node.LocalNode
- func (ws *WsServer) IsValidMsg(reqMsg map[string]interface{}) bool
- func (ws *WsServer) NotifyWrongClients()
- func (ws *WsServer) OnDataHandle(curSession *session.Session, messageType int, bysMsg []byte, r *http.Request) error
- func (ws *WsServer) PushResult(resp map[string]interface{})
- func (ws *WsServer) PushTxResult(txHashStr string, resp map[string]interface{})
- func (ws *WsServer) Restart()
- func (ws *WsServer) SetTxHashMap(txhash string, sessionid string)
- func (ws *WsServer) Start() error
- func (ws *WsServer) Stop()
Constants ¶
View Source
const (
TlsPort = 443
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DelayedChan ¶
type DelayedChan struct {
// contains filtered or unexported fields
}
func NewDelayedChan ¶
func NewDelayedChan(size int, delay time.Duration) *DelayedChan
func (*DelayedChan) Pop ¶
func (dc *DelayedChan) Pop() (interface{}, bool)
func (*DelayedChan) Push ¶
func (dc *DelayedChan) Push(v interface{}) bool
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 // contains filtered or unexported fields }
func (*WsServer) GetClientsById ¶
func (*WsServer) GetNetNode ¶
func (*WsServer) IsValidMsg ¶
func (*WsServer) NotifyWrongClients ¶
func (ws *WsServer) NotifyWrongClients()
func (*WsServer) OnDataHandle ¶
func (*WsServer) PushResult ¶
func (*WsServer) PushTxResult ¶
func (*WsServer) SetTxHashMap ¶
Click to show internal directories.
Click to hide internal directories.