pager

package
v0.0.0-...-602a947 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2018 License: MIT Imports: 5 Imported by: 0

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

type BroadcastTextMsg struct {
	MsgId   core.Byte16
	MsgText string
}

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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL