Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseIDsToStrings ¶
ParseIDsToStrings parses ID slice to string slice.
Types ¶
type DataPackage ¶
func (*DataPackage) Size ¶
func (d *DataPackage) Size() (s uint64)
type ID ¶
type ID string
ID is an identifier used to mark the module which the net msg belong to.
const ( // TestingPID is a protocol id for testing. TestingPID ID = "/_testing" )
func ParseStringsToIDs ¶
ParseStringsToIDs parses string slice to ID slice.
type Package ¶
type Package struct {
// contains filtered or unexported fields
}
Package is a container for net message.
func NewPackage ¶
NewPackage create a Package contains message payload with protocol.
func (*Package) ProtocolID ¶
ProtocolID return the protocol id that the message marked.
Click to show internal directories.
Click to hide internal directories.