Odamex
Setting the Standard in Multiplayer Doom
common/i_net.h File Reference

Go to the source code of this file.

Data Structures

struct  msg_info_t
struct  netadr_t
class  buf_t

Enumerations

enum  svc_t {
  svc_abort, svc_full, svc_disconnect, svc_reserved3,
  svc_playerinfo, svc_moveplayer, svc_updatelocalplayer, svc_svgametic,
  svc_updateping, svc_spawnmobj, svc_disconnectclient, svc_loadmap,
  svc_consoleplayer, svc_mobjspeedangle, svc_explodemissile, svc_removemobj,
  svc_userinfo, svc_movemobj, svc_spawnplayer, svc_damageplayer,
  svc_killmobj, svc_firepistol, svc_fireshotgun, svc_firessg,
  svc_firechaingun, svc_fireweapon, svc_sector, svc_print,
  svc_mobjinfo, svc_updatefrags, svc_teampoints, svc_activateline,
  svc_movingsector, svc_startsound, svc_reconnect, svc_exitlevel,
  svc_touchspecial, svc_changeweapon, svc_reserved42, svc_corpse,
  svc_missedpacket, svc_soundorigin, svc_reserved46, svc_reserved47,
  svc_forceteam, svc_switch, svc_reserved50, svc_reserved51,
  svc_spawnhiddenplayer, svc_updatedeaths, svc_ctfevent, svc_serversettings,
  svc_spectate, svc_connectclient, svc_midprint, svc_mobjstate = 70,
  svc_actor_movedir, svc_actor_target, svc_actor_tracer, svc_damagemobj,
  svc_wadinfo, svc_wadchunk, svc_compressed = 200, svc_launcher_challenge = 212,
  svc_challenge = 163, svc_max = 255
}
enum  clc_t {
  clc_abort, clc_reserved1, clc_disconnect, clc_say,
  clc_move, clc_userinfo, clc_svgametic, clc_rate,
  clc_ack, clc_rcon, clc_rcon_password, clc_changeteam,
  clc_ctfcommand, clc_spectate, clc_wantwad, clc_kill,
  clc_cheat, clc_cheatpulse, clc_launcher_challenge = 212, clc_challenge = 163,
  clc_max = 255
}
enum  svc_compressed_masks { adaptive_mask = 1, adaptive_select_mask = 2, adaptive_record_mask = 4, minilzo_mask = 8 }

Functions

void CloseNetwork (void)
void InitNetCommon (void)
void I_SetPort (netadr_t &addr, int port)
bool NetWaitOrTimeout (size_t ms)
char * NET_AdrToString (netadr_t a)
bool NET_StringToAdr (const char *s, netadr_t *a)
bool NET_CompareAdr (netadr_t a, netadr_t b)
int NET_GetPacket (void)
void NET_SendPacket (buf_t &buf, netadr_t &to)
std::string NET_GetLocalAddress (void)
void SZ_Clear (buf_t *buf)
void SZ_Write (buf_t *b, const void *data, int length)
void SZ_Write (buf_t *b, const byte *data, int startpos, int length)
void MSG_WriteByte (buf_t *b, byte c)
void MSG_WriteMarker (buf_t *b, svc_t c)
void MSG_WriteMarker (buf_t *b, clc_t c)
void MSG_WriteShort (buf_t *b, short c)
void MSG_WriteLong (buf_t *b, int c)
void MSG_WriteBool (buf_t *b, bool)
void MSG_WriteFloat (buf_t *b, float)
void MSG_WriteString (buf_t *b, const char *s)
void MSG_WriteChunk (buf_t *b, const void *p, unsigned l)
int MSG_BytesLeft (void)
int MSG_NextByte (void)
int MSG_ReadByte (void)
void * MSG_ReadChunk (const size_t &size)
int MSG_ReadShort (void)
int MSG_ReadLong (void)
bool MSG_ReadBool (void)
float MSG_ReadFloat (void)
const char * MSG_ReadString (void)
bool MSG_DecompressMinilzo ()
bool MSG_CompressMinilzo (buf_t &buf, size_t start_offset, size_t write_gap)
bool MSG_DecompressAdaptive (huffman &huff)
bool MSG_CompressAdaptive (huffman &huff, buf_t &buf, size_t start_offset, size_t write_gap)

Variables

int localport
int msg_badread
msg_info_t clc_info [clc_max]
msg_info_t svc_info [svc_max]
netadr_t net_from
buf_t net_message

Enumeration Type Documentation

enum clc_t
Enumerator:
clc_abort 
clc_reserved1 
clc_disconnect 
clc_say 
clc_move 
clc_userinfo 
clc_svgametic 
clc_rate 
clc_ack 
clc_rcon 
clc_rcon_password 
clc_changeteam 
clc_ctfcommand 
clc_spectate 
clc_wantwad 
clc_kill 
clc_cheat 
clc_cheatpulse 
clc_launcher_challenge 
clc_challenge 
clc_max 
Enumerator:
adaptive_mask 
adaptive_select_mask 
adaptive_record_mask 
minilzo_mask 
enum svc_t
Enumerator:
svc_abort 
svc_full 
svc_disconnect 
svc_reserved3 
svc_playerinfo 
svc_moveplayer 
svc_updatelocalplayer 
svc_svgametic 
svc_updateping 
svc_spawnmobj 
svc_disconnectclient 
svc_loadmap 
svc_consoleplayer 
svc_mobjspeedangle 
svc_explodemissile 
svc_removemobj 
svc_userinfo 
svc_movemobj 
svc_spawnplayer 
svc_damageplayer 
svc_killmobj 
svc_firepistol 
svc_fireshotgun 
svc_firessg 
svc_firechaingun 
svc_fireweapon 
svc_sector 
svc_print 
svc_mobjinfo 
svc_updatefrags 
svc_teampoints 
svc_activateline 
svc_movingsector 
svc_startsound 
svc_reconnect 
svc_exitlevel 
svc_touchspecial 
svc_changeweapon 
svc_reserved42 
svc_corpse 
svc_missedpacket 
svc_soundorigin 
svc_reserved46 
svc_reserved47 
svc_forceteam 
svc_switch 
svc_reserved50 
svc_reserved51 
svc_spawnhiddenplayer 
svc_updatedeaths 
svc_ctfevent 
svc_serversettings 
svc_spectate 
svc_connectclient 
svc_midprint 
svc_mobjstate 
svc_actor_movedir 
svc_actor_target 
svc_actor_tracer 
svc_damagemobj 
svc_wadinfo 
svc_wadchunk 
svc_compressed 
svc_launcher_challenge 
svc_challenge 
svc_max 

Function Documentation

void CloseNetwork ( void  )
void I_SetPort ( netadr_t addr,
int  port 
)
void InitNetCommon ( void  )
int MSG_BytesLeft ( void  )
bool MSG_CompressAdaptive ( huffman huff,
buf_t buf,
size_t  start_offset,
size_t  write_gap 
)
bool MSG_CompressMinilzo ( buf_t buf,
size_t  start_offset,
size_t  write_gap 
)
bool MSG_DecompressAdaptive ( huffman huff)
bool MSG_DecompressMinilzo ( )
int MSG_NextByte ( void  )
bool MSG_ReadBool ( void  )
int MSG_ReadByte ( void  )
void* MSG_ReadChunk ( const size_t &  size)
float MSG_ReadFloat ( void  )
int MSG_ReadLong ( void  )
int MSG_ReadShort ( void  )
const char* MSG_ReadString ( void  )
void MSG_WriteBool ( buf_t b,
bool   
)
void MSG_WriteByte ( buf_t b,
byte  c 
)
void MSG_WriteChunk ( buf_t b,
const void *  p,
unsigned  l 
)
void MSG_WriteFloat ( buf_t b,
float   
)
void MSG_WriteLong ( buf_t b,
int  c 
)
void MSG_WriteMarker ( buf_t b,
svc_t  c 
)
void MSG_WriteMarker ( buf_t b,
clc_t  c 
)
void MSG_WriteShort ( buf_t b,
short  c 
)
void MSG_WriteString ( buf_t b,
const char *  s 
)
char* NET_AdrToString ( netadr_t  a)
bool NET_CompareAdr ( netadr_t  a,
netadr_t  b 
)
std::string NET_GetLocalAddress ( void  )
int NET_GetPacket ( void  )
void NET_SendPacket ( buf_t buf,
netadr_t to 
)
bool NET_StringToAdr ( const char *  s,
netadr_t a 
)
bool NetWaitOrTimeout ( size_t  ms)
void SZ_Clear ( buf_t buf)
void SZ_Write ( buf_t b,
const byte data,
int  startpos,
int  length 
)
void SZ_Write ( buf_t b,
const void *  data,
int  length 
)

Variable Documentation

msg_info_t clc_info[clc_max]
int localport
msg_info_t svc_info[svc_max]
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends