Functions | |
qboolean | Datagram_CanSendMessage (qsocket_t *sock) |
Check if a reliable message can be sent to the socket. More... | |
qboolean | Datagram_CanSendUnreliableMessage (qsocket_t *sock) |
Check if an unreliable message can be sent to the socket. More... | |
qsocket_t * | Datagram_CheckNewConnections (void) |
Check for a new incoming connection. More... | |
void | Datagram_Close (qsocket_t *sock) |
Close the socket. More... | |
qsocket_t * | Datagram_Connect (const char *host) |
Connect to the specified host. More... | |
int | Datagram_GetMessage (qsocket_t *sock) |
Check for and process an incoming packet on the socket. More... | |
int | Datagram_Init (void) |
Initialize the Datagram net driver. More... | |
void | Datagram_Listen (qboolean state) |
Control the listen status of the underlying lan drivers. More... | |
void | Datagram_SearchForHosts (qboolean xmit) |
Search for hosts (servers) on the local network. More... | |
int | Datagram_SendMessage (qsocket_t *sock, sizebuf_t *data) |
Send a reliable packet to the socket. More... | |
int | Datagram_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data) |
Send an unreliable packet to the socket. More... | |
void | Datagram_Shutdown (void) |
Shutdown the Datagram net driver. More... | |
Check if a reliable message can be sent to the socket.
sock | The socket to check. |
Check if an unreliable message can be sent to the socket.
Always true.
sock | The socket to check. |
qsocket_t* Datagram_CheckNewConnections | ( | void | ) |
Check for a new incoming connection.
void Datagram_Close | ( | qsocket_t * | sock | ) |
Close the socket.
sock | The socket to close. |
Connect to the specified host.
host | The host to which the connection will be made. |
Check for and process an incoming packet on the socket.
sock | The socket to check. |
If there is an outstanding reliable packet and more than 1 second has passed, resend the packet.
Copy unreliable data to net_message
Append reliable data to sock->receiveMessage.
int Datagram_Init | ( | void | ) |
Initialize the Datagram net driver.
Also initializes the underlying lan drivers.
void Datagram_Listen | ( | qboolean | state | ) |
Control the listen status of the underlying lan drivers.
state | True to enable, false to disable. |
void Datagram_SearchForHosts | ( | qboolean | xmit | ) |
Search for hosts (servers) on the local network.
If xmit
is true, broadcast a CCREQ_SERVER_INFO packet via all underlying lan drivers using their control ports.
Check for any CCREP_SERVER_INFO responses. Ignore all other packets.
xmit | True to send the broadcast, falst to only listen. |
Send a reliable packet to the socket.
sock | The socket to which the packet will be sent. |
data | The packet to be sent. |
Send an unreliable packet to the socket.
sock | The socket to which the packet will be sent. |
data | The packet to be sent. |
void Datagram_Shutdown | ( | void | ) |
Shutdown the Datagram net driver.