Functions | |
const char * | NET_AdrToString (netadr_t a) |
Convert an address to a string. More... | |
const char * | NET_BaseAdrToString (netadr_t a) |
Convert an address to a string. More... | |
qboolean | NET_CompareAdr (netadr_t a, netadr_t b) |
Compare two network addresses. More... | |
qboolean | NET_CompareBaseAdr (netadr_t a, netadr_t b) |
Compare two network addresses. More... | |
qboolean | NET_GetPacket (void) |
Read a single packet from the network into net_message. More... | |
void | NET_Init (int port) |
Initialize the UDP network interface. More... | |
void | NET_SendPacket (int length, const void *data, netadr_t to) |
Send a data packet out to the network. More... | |
void | NET_Shutdown (void) |
Shutdown the UDP network interface. More... | |
qboolean | NET_StringToAdr (const char *s, netadr_t *a) |
Convert a human readable address to a quake address. More... | |
Convert an address to a string.
Include the port number in the string.
a | The address to convert |
Convert an address to a string.
Do not include the port number in the string.
a | The address to convert |
Compare two network addresses.
Compare the port number too.
a | The first address to compare. |
b | The second address to compare. |
Compare two network addresses.
Ignore the port number.
a | The first address to compare. |
b | The second address to compare. |
qboolean NET_GetPacket | ( | void | ) |
Read a single packet from the network into net_message.
void NET_Init | ( | int | port | ) |
Initialize the UDP network interface.
Opens a single socket to be used for all communications.
port | The port to which the socket will be bound. |
Send a data packet out to the network.
length | The length of the data to be sent. |
data | The data to be sent. |
to | The address to which the data will be sent. |
void NET_Shutdown | ( | void | ) |
Shutdown the UDP network interface.
Convert a human readable address to a quake address.
Accepts both host names (full or partial) and numeric form.
If a port is specified, the port value in the address will be set to that value, otherwise it will be set to 0.
[in] | s | The human readable address to be converted. |
[out] | a | The resulting address of the conversion. |