Network Peer More...
Static Public Member Functions | |
static void | Destroy (NetPeer *p, INetSocket socket, INetPeerGroupCallbacks callbacks) |
Destroys the specified NetPeer instance and releases associated resources. More... | |
static void | DestroySocket (NetPeer *p, INetSocket socket, INetPeerGroupCallbacks callbacks) |
static short | FindGroupWithLeastAssignedAddresses (NetPeer *p) |
static NetConfig * | GetConfigPointer (NetPeer *p) |
Gets a pointer to the configuration settings of the specified NetPeer. More... | |
static NetPeerGroup * | GetGroup (NetPeer *p, int index) |
Gets a pointer to the NetPeerGroup at the specified index. More... | |
static NetPeer * | Initialize (NetConfig config, INetSocket socket) |
Initializes a new instance of the NetPeer structure with the specified configuration and socket. More... | |
static void | Initialize (NetPeer *p, NetConfig config, INetSocket socket) |
Initializes the specified NetPeer instance with the given configuration and socket. More... | |
static void | Recv (NetPeer *p, INetSocket socket, bool *work, System.Random rng) |
Receives data for the specified NetPeer and indicates whether work was done. More... | |
static void | Recv (NetPeer *p, INetSocket socket, System.Random rng) |
Receives data for the specified NetPeer. More... | |
static bool | RecvBufferAvailable (NetPeer *p) |
static void | RecvBufferPushToGroup (NetPeer *p, INetSocket socket, Random rng) |
static bool | RecvExpired (NetPeer *p) |
static void | RecvInternal (NetPeer *p, INetSocket socket, bool *work, System.Random rng) |
static void | RemapAddress (NetPeer *p, NetAddress oldAddress, NetAddress newAddress) |
Remaps the network address of the specified NetPeer. More... | |
static void | Send (NetPeer *p, INetSocket socket) |
Sends data for the specified NetPeer. More... | |
static void | Send (NetPeer *p, INetSocket socket, bool *work) |
Sends data for the specified NetPeer and indicates whether work was done. More... | |
static void | SendFromStack (NetPeer *p, INetSocket socket, bool *work) |
static void | SendInternal (NetPeer *p, INetSocket socket, bool *work) |
static void | Update (NetPeer *p, INetSocket socket, bool *work, System.Random rng) |
Updates the state of the specified NetPeer and indicates whether work was done. More... | |
static void | Update (NetPeer *p, INetSocket socket, System.Random rng) |
Updates the state of the specified NetPeer. More... | |
Public Attributes | |
NetAddress | _address |
NetConfig | _config |
byte * | _fragmentBuffer |
NetPeerGroup * | _groups |
int * | _groupsAssigned |
NetPeerGroupMap * | _groupsMap |
NetBitBuffer * | _recv |
NetBitBufferBlock * | _recvBlock |
Timer | _recvTimer |
NetCommandRefused * | _refusedCommand |
NetBitBufferStack | _sendStack |
volatile int | _state |
Static Public Attributes | |
const int | DEFAULT_HEADERS = 40 + 8 + 96 |
IPv6 header: 40 bytes, UDP header: 8 bytes, Realtime Header: 96 bytes More... | |
const int | MAX_MTU_BITS_PAYLOAD = MAX_MTU_BYTES_PAYLOAD * 8 |
MaximumTransferUnit bits. (ipv6 header: 40 bytes, udp header: 8 bytes) More... | |
const int | MAX_MTU_BYTES_PAYLOAD = MAX_MTU_BYTES_TOTAL - DEFAULT_HEADERS |
MaximumTransferUnit payload bytes. More... | |
const int | MAX_MTU_BYTES_TOTAL = 1280 |
MaximumTransferUnit total bytes. More... | |
const int | MAX_PACKET_BYTES_PAYLOAD = (MAX_MTU_BYTES_PAYLOAD - NetNotifyHeader.SIZE_IN_BYTES) * FRAG_MAX_COUNT |
Max packet payload size in bytes. (Considering the NetNotifyHeader size for each fragment) More... | |
const int | MAX_PACKET_BYTES_TOTAL = MAX_MTU_BYTES_TOTAL * FRAG_MAX_COUNT |
Max packet total size in bytes. More... | |
const int | STATE_RUNNING = 0 |
const int | STATE_SHUTDOWN = 2 |
Properties | |
NetAddress | Address [get] |
Gets the network address of the peer. More... | |
NetConfig | Config [get] |
Gets the configuration settings for the peer. More... | |
int | GroupCount [get] |
Gets the number of connection groups. More... | |
bool | IsShutdown [get] |
Gets a value indicating whether the peer is shut down. More... | |
Network Peer
|
static |
Destroys the specified NetPeer instance and releases associated resources.
p | A pointer to the NetPeer instance. |
socket | The socket used for network communication. |
callbacks | The callbacks for the NetPeerGroup. |
|
static |
Gets a pointer to the NetPeerGroup at the specified index.
p | A pointer to the NetPeer instance. |
index | The index of the NetPeerGroup. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
IPv6 header: 40 bytes, UDP header: 8 bytes, Realtime Header: 96 bytes
|
static |
MaximumTransferUnit bits. (ipv6 header: 40 bytes, udp header: 8 bytes)
Same as MAX_MTU_BYTES_PAYLOAD but in bits.
|
static |
MaximumTransferUnit payload bytes.
The maximum number of bytes available for data(payload) in a single UDP packet.
|
static |
MaximumTransferUnit total bytes.
The maximum size of bytes that can be sent in a single UDP packet.
|
static |
Max packet payload size in bytes. (Considering the NetNotifyHeader size for each fragment)
The maximum number of bytes available for data that can be fragmented into multiple packets of size MAX_MTU_BYTES_PAYLOAD.
|
static |
Max packet total size in bytes.
The maximum number of bytes that can be fragmented into multiple packets of size MAX_MTU_BYTES_TOTAL.
|
get |
Gets the network address of the peer.
|
get |
Gets the configuration settings for the peer.
|
get |
Gets the number of connection groups.
|
get |
Gets a value indicating whether the peer is shut down.