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

Typedefs

typedef int SOCKET
typedef int socklen_t

Functions

 EXTERN_CVAR (port) msg_info_t clc_info[clc_max]
 EXTERN_CVAR (sv_upnp) EXTERN_CVAR(sv_upnp_discovertimeout) EXTERN_CVAR(sv_upnp_description) EXTERN_CVAR(sv_upnp_internalip) EXTERN_CVAR(sv_upnp_externalip) static struct UPNPUrls urls
void init_upnp (void)
void upnp_add_redir (const char *addr, int port)
void upnp_rem_redir (int port)
SOCKET UDPsocket (void)
void BindToLocalPort (SOCKET s, u_short wanted)
void CloseNetwork (void)
void SockadrToNetadr (struct sockaddr_in *s, netadr_t *a)
void NetadrToSockadr (netadr_t *a, struct sockaddr_in *s)
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_WriteMarker (buf_t *b, clc_t c)
void MSG_WriteByte (buf_t *b, byte c)
void MSG_WriteChunk (buf_t *b, const void *p, unsigned l)
void MSG_WriteShort (buf_t *b, short c)
void MSG_WriteLong (buf_t *b, int c)
void MSG_WriteBool (buf_t *b, bool Boolean)
void MSG_WriteFloat (buf_t *b, float Float)
void MSG_WriteString (buf_t *b, const char *s)
int MSG_BytesLeft (void)
int MSG_ReadByte (void)
int MSG_NextByte (void)
void * MSG_ReadChunk (const size_t &size)
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)
int MSG_ReadShort (void)
int MSG_ReadLong (void)
bool MSG_ReadBool (void)
const char * MSG_ReadString (void)
float MSG_ReadFloat (void)
void InitNetMessageFormats ()
void InitNetCommon (void)
bool NetWaitOrTimeout (size_t ms)
void I_SetPort (netadr_t &addr, int port)

Variables

int inet_socket
int localport
netadr_t net_from
buf_t net_message (MAX_UDP_PACKET)
buf_t compressed
buf_t decompressed
lzo_byte wrkmem [LZO1X_1_MEM_COMPRESS]
msg_info_t svc_info [svc_max]

Typedef Documentation

typedef int SOCKET
typedef int socklen_t

Function Documentation

void BindToLocalPort ( SOCKET  s,
u_short  wanted 
)
void CloseNetwork ( void  )
EXTERN_CVAR ( sv_upnp  )
EXTERN_CVAR ( port  )
void I_SetPort ( netadr_t addr,
int  port 
)
void init_upnp ( void  )
void InitNetCommon ( void  )
void InitNetMessageFormats ( )
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  Boolean 
)
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  Float 
)
void MSG_WriteLong ( buf_t b,
int  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 
)
void NetadrToSockadr ( netadr_t a,
struct sockaddr_in *  s 
)
bool NetWaitOrTimeout ( size_t  ms)
void SockadrToNetadr ( struct sockaddr_in *  s,
netadr_t a 
)
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 
)
SOCKET UDPsocket ( void  )
void upnp_add_redir ( const char *  addr,
int  port 
)
void upnp_rem_redir ( int  port)

Variable Documentation

int localport
buf_t net_message(MAX_UDP_PACKET)
msg_info_t svc_info[svc_max]
lzo_byte wrkmem[LZO1X_1_MEM_COMPRESS]
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends