Documentation ¶
Index ¶
- type BaseAction
- func (this *BaseAction) PrepareSend(peerId string, data interface{}, targetPeerId string) *msg.ChainMessage
- func (this *BaseAction) Receive(chainMessage *msg.ChainMessage) (*msg.ChainMessage, error)
- func (this *BaseAction) Response(chainMessage *msg.ChainMessage) error
- func (this *BaseAction) Send(chainMessage *msg.ChainMessage) (*msg.ChainMessage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseAction ¶
func (*BaseAction) PrepareSend ¶
func (this *BaseAction) PrepareSend(peerId string, data interface{}, targetPeerId string) *msg.ChainMessage
func (*BaseAction) Receive ¶
func (this *BaseAction) Receive(chainMessage *msg.ChainMessage) (*msg.ChainMessage, error)
* 接收消息进行处理,返回为空则没有返回消息,否则,有返回消息
func (*BaseAction) Response ¶
func (this *BaseAction) Response(chainMessage *msg.ChainMessage) error
* 处理返回消息
func (*BaseAction) Send ¶
func (this *BaseAction) Send(chainMessage *msg.ChainMessage) (*msg.ChainMessage, error)
* 主动发送消息
Click to show internal directories.
Click to hide internal directories.