Documentation ¶
Index ¶
Constants ¶
View Source
const ( // a broadcast message for text messages during poc BroadcastText = protocol.Handshake + 1 )
protocol messages
Variables ¶
View Source
var ProtocolMsgCount = uint64(msgCount)
number of implemented messages for each supported version of the protocol
View Source
var ProtocolName = "pager"
short protocol name for handshake negotiation
View Source
var ProtocolVersion = uint(poc1)
supported versions of the protocol for this codebase
Functions ¶
This section is empty.
Types ¶
type BroadcastTextMsg ¶
a broadcast message for text message on the network during poc
type PageHandler ¶
type PageHandler func(from, txt string)
signature for callback function when a page is recieved
type PagerProtocolManager ¶
type PagerProtocolManager struct { protocol.ManagerBase // contains filtered or unexported fields }
a "pager" protocol manager implementation
func NewPagerProtocolManager ¶
func NewPagerProtocolManager(callback PageHandler) *PagerProtocolManager
create a new instance of pager protocol manager
func (*PagerProtocolManager) Broadcast ¶
func (mgr *PagerProtocolManager) Broadcast(msg BroadcastTextMsg) int
func (*PagerProtocolManager) Protocol ¶
func (mgr *PagerProtocolManager) Protocol() p2p.Protocol
func (*PagerProtocolManager) Shutdown ¶
func (mgr *PagerProtocolManager) Shutdown()
Click to show internal directories.
Click to hide internal directories.