OpenTTD
Functions
os_abstraction.h File Reference

Network stuff has many things that needs to be included and/or implemented by default. More...

Go to the source code of this file.

Functions

static bool SetNonBlocking (SOCKET d)
 Try to set the socket into non-blocking mode.
static bool SetNoDelay (SOCKET d)
 Try to set the socket to not delay sending.
 assert_compile (sizeof(in_addr)==4)
 IPv4 addresses should be 4 bytes.
 assert_compile (sizeof(in6_addr)==16)
 IPv6 addresses should be 16 bytes.

Detailed Description

Network stuff has many things that needs to be included and/or implemented by default.

All those things are in this file.

Definition in file os_abstraction.h.

Function Documentation

static bool SetNoDelay ( SOCKET  d)
inlinestatic

Try to set the socket to not delay sending.

Parameters
dThe socket to disable the delaying for.
Returns
True if disabling the delaying succeeded, otherwise false.

Definition at line 333 of file os_abstraction.h.

Referenced by TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::AcceptClient(), ConnectLoopProc(), and ListenLoopProc().

static bool SetNonBlocking ( SOCKET  d)
inlinestatic

Try to set the socket into non-blocking mode.

Parameters
dThe socket to set the non-blocking more for.
Returns
True if setting the non-blocking mode succeeded, otherwise false.

Definition at line 314 of file os_abstraction.h.

Referenced by TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::AcceptClient(), ConnectLoopProc(), ListenLoopProc(), and NetworkUDPSocketHandler::ReceivePackets().