Documentation ¶
Index ¶
- type Item
- type Message
- type MessageServer
- func (p *MessageServer) Close()
- func (p *MessageServer) RegisterBytesMsgHandler(msgType MessageType, reqHandler func([]byte) []byte)
- func (p *MessageServer) RegisterMsgHandler(msgType MessageType, reqHandler func(message Message) []byte)
- func (p *MessageServer) SendRequest(msgType MessageType, payload []byte, address p2pcrypto.PublicKey, ...) error
- type MessageType
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageServer ¶
type MessageServer struct { log.Log ReqId uint64 //request id // contains filtered or unexported fields }
func NewMsgServer ¶
func NewMsgServer(network Service, name string, requestLifetime time.Duration, c chan service.DirectMessage, logger log.Log) *MessageServer
func (*MessageServer) Close ¶
func (p *MessageServer) Close()
func (*MessageServer) RegisterBytesMsgHandler ¶
func (p *MessageServer) RegisterBytesMsgHandler(msgType MessageType, reqHandler func([]byte) []byte)
func (*MessageServer) RegisterMsgHandler ¶
func (p *MessageServer) RegisterMsgHandler(msgType MessageType, reqHandler func(message Message) []byte)
func (*MessageServer) SendRequest ¶
func (p *MessageServer) SendRequest(msgType MessageType, payload []byte, address p2pcrypto.PublicKey, resHandler func(msg []byte)) error
type MessageType ¶
type MessageType uint32
type Service ¶
type Service interface { RegisterDirectProtocolWithChannel(protocol string, ingressChannel chan service.DirectMessage) chan service.DirectMessage SendWrappedMessage(nodeID p2pcrypto.PublicKey, protocol string, payload *service.DataMsgWrapper) error }
Click to show internal directories.
Click to hide internal directories.