Property | Type | Description | |
---|---|---|---|
MagicCookie | |||
mc_addr | |||
mc_endpoint | |||
mc_port | int |
Property | Type | Description | |
---|---|---|---|
_listen_thread | Thread | ||
_mc | Socket | ||
_running | int | ||
_uc | Socket |
Method | Description | |
---|---|---|
CreateMulticastSender ( ) : ISender |
Creates a new MulticastSender using the IPHandlers multicastcast socket. This sends to all network devices on the computer.
|
|
CreateMulticastSender ( |
Creates a Multicast Sender using the unicast socket, so that other nodes know where they can reach us. Only sends to the addresses in the array.
|
|
CreateUnicastSender ( |
Creates a new UnicastSender using the IPHandlers unicast socket.
|
|
GetLocalIPAddresses ( ) : System.Net.IPAddress[] |
Returns an array of all the IPAddresses of the local machine. Manually add loopback sense Windows does not have a loopback interface.
|
|
IPAddressToInt ( |
IPAddress.Address is obsolete, we use our own method to convert to an int in case the method is removed.
|
|
IPHandler ( ) : System |
Creates a new IPHandler object by initializing the multicast and unicast socket. The multicast socket is optional as nodes can discover other working nodes using only the unicast socket. The steps for setup for a multicast socket are bind to 0.0.0.0:port, add membership to all IP Addresses on the node, allow MulticastLoopback. The steps for the unicast socket are to create socket andbind to 0.0.0.0 and random port. Afterwhich the _listen_thread is started in the background. |
|
Stop ( ) : void |
Called to interrupt the _listen_thread.
|
Method | Description | |
---|---|---|
Listen ( ) : void |
The _listen_threads method, reads from sockets and let's the node handle the incoming data.
|
public CreateMulticastSender ( |
||
LocalIPAddresses | The local ip addresses we should send on. | |
return | ISender |
public CreateUnicastSender ( |
||
ep | The remote network end point where the UnicastSender should send the data. | |
return | ISender |
public static GetLocalIPAddresses ( ) : System.Net.IPAddress[] | ||
return | System.Net.IPAddress[] |
public static IPAddressToInt ( |
||
addr | The address to convert to an integer. | |
return | int |
public static MemBlock,Brunet.Util MagicCookie | ||
return |
public static IPAddress,System.Net mc_addr | ||
return |
public static EndPoint,System.Net mc_endpoint | ||
return |