Link

Link

Description: Represents a "pipe" whereby different protocol messages can be transported over. Such protocol messages include data packet transport (receiving and sending) along with router advertisements messages

This class handles the Message queues for sending and receiving messages (and partially decoding them)

Constructors

this
this(string interfaceName, Engine engine)
Undocumented in source.

Members

Aliases

LinkUnitHandler
alias LinkUnitHandler = void function(LinkUnit)
Undocumented in source.

Functions

enqueueIn
void enqueueIn(LinkUnit unit)
Undocumented in source. Be warned that the author may not have intended to support it.
getHandler
LinkUnitHandler getHandler(ubyte code)

Returns the given handler function associated with the provided message type.

getInterface
string getInterface()
Undocumented in source. Be warned that the author may not have intended to support it.
getR2RPort
ushort getR2RPort()

Returns the router-to-router port being used for this link

hasInQueue
bool hasInQueue()
Undocumented in source. Be warned that the author may not have intended to support it.
launch
void launch()
Undocumented in source. Be warned that the author may not have intended to support it.
popInQueue
LinkUnit popInQueue()
Undocumented in source. Be warned that the author may not have intended to support it.
receive
LinkMessage receive()

Blocks to receive one message from the incoming queue

registerHandler
void registerHandler(LinkUnitHandler funcPtr, ubyte code)
Undocumented in source. Be warned that the author may not have intended to support it.
send
void send(LinkMessage message, string recipient)

Sends a message

setDefaultHandler
void setDefaultHandler(LinkUnitHandler funcPtr)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

decode
LinkMessage decode(byte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
getNeighborIPAddress
Address getNeighborIPAddress(Address sender, ushort neighborPort)

Given Address we take the IP address (not source port of mcast packet) and then also the nieghborPort and spit out a new Address

Meta