Go to the documentation of this file.
116 SZ_Init (&send, send_buf,
sizeof(send_buf));
137 va_start (argptr,
format);
154 memset (chan, 0,
sizeof(*chan));
188 send_reliable =
false;
192 send_reliable =
true;
197 send_reliable =
true;
200 return send_reliable;
241 SZ_Init (&send, send_buf,
sizeof(send_buf));
267 Com_Printf (
"Netchan_Transmit: dumped unreliable\n");
275 Com_Printf (
"send %4i : s=%i reliable=%i ack=%i rack=%i\n"
282 Com_Printf (
"send %4i : s=%i ack=%i rack=%i\n"
300 unsigned sequence, sequence_ack;
301 unsigned reliable_ack, reliable_message;
313 reliable_message = sequence >> 31;
314 reliable_ack = sequence_ack >> 31;
316 sequence &= ~(1<<31);
317 sequence_ack &= ~(1<<31);
321 if (reliable_message)
322 Com_Printf (
"recv %4i : s=%i reliable=%i ack=%i rack=%i\n"
329 Com_Printf (
"recv %4i : s=%i ack=%i rack=%i\n"
339 if (sequence <= chan->incoming_sequence)
342 Com_Printf (
"%s:Out of order packet %i at %i\n"
375 if (reliable_message)
int last_reliable_sequence
int incoming_acknowledged
qboolean Netchan_CanReliable(netchan_t *chan)
int MSG_ReadShort(sizebuf_t *msg_read)
void Netchan_OutOfBand(int net_socket, netadr_t adr, int length, byte *data)
void MSG_WriteLong(sizebuf_t *sb, int c)
char * NET_AdrToString(netadr_t a)
void SZ_Init(sizebuf_t *buf, byte *data, int length)
cvar_t * Cvar_Get(char *var_name, char *var_value, int flags)
void SZ_Write(sizebuf_t *buf, void *data, int length)
char * va(char *format,...)
int incoming_reliable_acknowledged
void NET_SendPacket(netsrc_t sock, int length, void *data, netadr_t to)
void MSG_WriteShort(sizebuf_t *sb, int c)
qboolean Netchan_Process(netchan_t *chan, sizebuf_t *msg)
void Netchan_Setup(netsrc_t sock, netchan_t *chan, netadr_t adr, int qport)
int MSG_ReadLong(sizebuf_t *msg_read)
byte reliable_buf[MAX_MSGLEN-16]
int incoming_reliable_sequence
void Netchan_Transmit(netchan_t *chan, int length, byte *data)
byte net_message_buffer[MAX_MSGLEN]
void Netchan_OutOfBandPrint(int net_socket, netadr_t adr, char *format,...)
void Com_Printf(char *fmt,...)
int Sys_Milliseconds(void)
byte message_buf[MAX_MSGLEN-16]
qboolean Netchan_NeedReliable(netchan_t *chan)
void MSG_BeginReading(sizebuf_t *msg)