Data Structures | |
| struct | _PollProcedure |
| struct | hostcache_t |
| struct | net_driver_t |
| struct | net_landriver_t |
| struct | netadr_t |
| struct | qsocket_s |
Macros | |
| #define | HOSTCACHESIZE 8 |
| #define | MAX_NET_DRIVERS 8 |
| #define | NET_DATAGRAMSIZE (MAX_DATAGRAM + NET_HEADERSIZE) |
| #define | NET_HEADERSIZE (2 * sizeof(unsigned int)) |
| #define | NET_MAXMESSAGE 32000 |
| #define | NET_NAMELEN 64 |
| #define | NET_PROTOCOL_VERSION 3 |
NetHeader flags | |
| #define | NETFLAG_LENGTH_MASK 0x0000ffff |
| #define | NETFLAG_DATA 0x00010000 |
| #define | NETFLAG_ACK 0x00020000 |
| #define | NETFLAG_NAK 0x00040000 |
| #define | NETFLAG_EOM 0x00080000 |
| #define | NETFLAG_UNRELIABLE 0x00100000 |
| #define | NETFLAG_CTL 0x80000000 |
Connection Protocol | |
This is the network info/connection protocol. It is used to find Quake servers, get info about them, and connect to them. Once connected, the Quake game protocol (documented elsewhere) is used. General notes:
| |
| #define | CCREQ_CONNECT 0x01 |
| Connect Request: More... | |
| #define | CCREQ_SERVER_INFO 0x02 |
| Connect Request: More... | |
| #define | CCREQ_PLAYER_INFO 0x03 |
| Connect Request: More... | |
| #define | CCREQ_RULE_INFO 0x04 |
| Connect Request: More... | |
| #define | CCREP_ACCEPT 0x81 |
| Connect Reply: More... | |
| #define | CCREP_REJECT 0x82 |
| Connect Reply: More... | |
| #define | CCREP_SERVER_INFO 0x83 |
| Connect Reply: More... | |
| #define | CCREP_PLAYER_INFO 0x84 |
| Connect Reply: More... | |
| #define | CCREP_RULE_INFO 0x85 |
| Connect Reply: More... | |
Typedefs | |
| typedef struct _PollProcedure | PollProcedure |
| typedef struct qsocket_s | qsocket_t |
Functions | |
| qboolean | NET_CanSendMessage (qsocket_t *sock) |
| Check if a message can be sent to the connection. More... | |
| struct qsocket_s * | NET_CheckNewConnections (void) |
| Check for new connections. More... | |
| void | NET_Close (struct qsocket_s *sock) |
| Close a connection. More... | |
| struct qsocket_s * | NET_Connect (const char *host) |
| Connect to a host. More... | |
| void | NET_FreeQSocket (qsocket_t *sock) |
| Destroy a qsocket. More... | |
| int | NET_GetMessage (struct qsocket_s *sock) |
| Read a single message from the connection into net_message. More... | |
| void | NET_Init (void) |
| Initialize the networking sub-system. More... | |
| qsocket_t * | NET_NewQSocket (void) |
| Create and initialize a new qsocket. More... | |
| void | NET_Poll (void) |
| Run any current poll procedures. More... | |
| int | NET_SendMessage (struct qsocket_s *sock, sizebuf_t *data) |
| Send a single reliable message to the connection. More... | |
| int | NET_SendToAll (sizebuf_t *data, double blocktime) |
| Send a reliable message to all attached clients. More... | |
| int | NET_SendUnreliableMessage (struct qsocket_s *sock, sizebuf_t *data) |
| Send a single unreliable message to the connection. More... | |
| void | NET_Shutdown (void) |
| Shutdown the networking sub-system. More... | |
| void | SchedulePollProcedure (PollProcedure *pp, double timeOffset) |
| Schedule a poll procedure to run. More... | |
| double | SetNetTime (void) |
| Cache the system time for the network sub-system. More... | |
Variables | |
| int | DEFAULTnet_hostport |
| hostcache_t | hostcache [HOSTCACHESIZE] |
| int | hostCacheCount |
| struct cvar_s * | hostname |
| char | my_tcpip_address [NET_NAMELEN] |
| int | net_activeconnections |
| int | net_driverlevel |
| net_driver_t | net_drivers [MAX_NET_DRIVERS] |
| int | net_hostport |
| net_landriver_t | net_landrivers [MAX_NET_DRIVERS] |
| struct msg_s * | net_message |
| int | net_numdrivers |
| int | net_numlandrivers |
| double | net_time |
| qboolean | slistInProgress |
| qboolean | slistLocal |
| qboolean | slistSilent |
| qboolean | tcpipAvailable |
| QFile * | vcrFile |
socket management | |
| qsocket_t * | net_activeSockets |
| qsocket_t * | net_freeSockets |
| int | net_numsockets |
message statistics | |
| int | messagesSent |
| int | messagesReceived |
| int | unreliableMessagesSent |
| int | unreliableMessagesReceived |