Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PacketTypeFlag ¶
type PacketTypeFlag byte
PacketTypeFlag represents flag present in all general data packets exchanged between all entities in the system. They are used to indicate type of the packet content, i.e. sphinx packet, pull request, etc.
const ( // AssignFlag is used to indicate client request to get registered at a particular provider. AssignFlag PacketTypeFlag = '\xa2' // CommFlag is used to indicate that the packet contains sphinx payload and should be processed accordingly. CommFlag PacketTypeFlag = '\xc6' // TokenFlag is used to indicate that the packet contains authentication token from provider // that is sent as a result of getting registered. TokenFlag PacketTypeFlag = '\xa9' // PullFlag is used to indicate client request to obtain all its messages stored at a particular provider. PullFlag PacketTypeFlag = '\xff' // InvalidFlag is used to indicate an invalid packet type flag. InvalidPacketTypeFlag PacketTypeFlag = '\x00' )
func PacketTypeFlagFromByte ¶
func PacketTypeFlagFromByte(b byte) PacketTypeFlag
func PacketTypeFlagFromBytes ¶
func PacketTypeFlagFromBytes(b []byte) PacketTypeFlag
func (PacketTypeFlag) Bytes ¶
func (pf PacketTypeFlag) Bytes() []byte
type SphinxFlag ¶
type SphinxFlag byte
SphinxFlag represents flag present in all sphinx packages to indicate whether the packet has reached its final hop or should be relayed.
const ( // LastHopFlag denotes whether this message has reached its final destination. LastHopFlag SphinxFlag = '\xf0' // RelayFlag denotes whether this message should continue further along the path of mixes. // This is implementation-specific rather than being part of the Loopix protocol design. RelayFlag SphinxFlag = '\xf1' // InvalidFlag denotes an invalid sphinx flag. InvalidSphinxFlag SphinxFlag = '\x00' )
func SphinxFlagFromByte ¶
func SphinxFlagFromByte(b byte) SphinxFlag
func SphinxFlagFromBytes ¶
func SphinxFlagFromBytes(b []byte) SphinxFlag
func (SphinxFlag) Bytes ¶
func (sf SphinxFlag) Bytes() []byte
Click to show internal directories.
Click to hide internal directories.