Documentation
¶
Index ¶
- Constants
- type DelayedChan
- type Handler
- type MsgServer
- func (ms *MsgServer) Broadcast(data []byte) error
- func (ms *MsgServer) GetClientsById(cliendID []byte) []*session.Session
- func (ms *MsgServer) GetNetNode() node.ILocalNode
- func (ms *MsgServer) IsValidMsg(reqMsg map[string]interface{}) bool
- func (ms *MsgServer) NotifyWrongClients()
- func (ms *MsgServer) OnDataHandle(curSession *session.Session, messageType int, bysMsg []byte, ...) error
- func (ms *MsgServer) PushResult(resp map[string]interface{})
- func (ms *MsgServer) PushTxResult(txHashStr string, resp map[string]interface{})
- func (ms *MsgServer) SetTxHashMap(txhash string, sessionid string)
- func (ms *MsgServer) Start(wssCertReady chan struct{}) error
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 MsgServer ¶ added in v2.2.1
type MsgServer struct { sync.RWMutex SessionList *session.SessionList ActionMap map[string]Handler TxHashMap map[string]string //key: txHash value:sessionid // contains filtered or unexported fields }
func InitMsgServer ¶ added in v2.2.1
func InitMsgServer(localNode node.ILocalNode, wallet *vault.Wallet) *MsgServer
func (*MsgServer) GetClientsById ¶ added in v2.2.1
func (*MsgServer) GetNetNode ¶ added in v2.2.1
func (ms *MsgServer) GetNetNode() node.ILocalNode
func (*MsgServer) IsValidMsg ¶ added in v2.2.1
func (*MsgServer) NotifyWrongClients ¶ added in v2.2.1
func (ms *MsgServer) NotifyWrongClients()
func (*MsgServer) OnDataHandle ¶ added in v2.2.1
func (*MsgServer) PushResult ¶ added in v2.2.1
func (*MsgServer) PushTxResult ¶ added in v2.2.1
func (*MsgServer) SetTxHashMap ¶ added in v2.2.1
Click to show internal directories.
Click to hide internal directories.