Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BCHBalance ¶
type ConnMgr ¶
type ConnMgr struct { MsgChan chan Message // contains filtered or unexported fields }
func NewConnMgr ¶
func NewConnMgr() *ConnMgr
func (*ConnMgr) GetConnForAddress ¶
func (c *ConnMgr) GetConnForAddress(addr string) (*Connection, bool)
func (*ConnMgr) Notify ¶
func (c *ConnMgr) Notify()
Notify serves the client for the relative addresses's balance for connection. Ignore the unknown address's messages only to log it. The client will be closed immediately if writing to client failed. The client should be reconnect to the server with all the specified addresses in the account.
type Connection ¶
type Connection struct { Conn *websocket.Conn // for websocket trace log Uid string QuitMutex sync.Mutex Quit chan struct{} // contains filtered or unexported fields }
func NewConnection ¶
func NewConnection(mgr *ConnMgr, conn *websocket.Conn, uid string) *Connection
func (*Connection) AddAddrs ¶
func (conn *Connection) AddAddrs(addrs []string)
AddAddrs only accept bech32 encoded address
func (*Connection) Close ¶
func (conn *Connection) Close()
Close should be only called by ConnMgr in order to maintain the ConnMgr state and data.
func (*Connection) DelAddr ¶
func (conn *Connection) DelAddr(addrs []string)
AddAddrs only accept bech32 encoded address
Click to show internal directories.
Click to hide internal directories.