OpenTTD Source  1.11.0-beta2
os_abstraction.h File Reference

Go to the source code of this file.

Functions

static bool SetNonBlocking (SOCKET d)
 Try to set the socket into non-blocking mode. More...
 
static bool SetNoDelay (SOCKET d)
 Try to set the socket to not delay sending. More...
 

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

◆ SetNoDelay()

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 200 of file os_abstraction.h.

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

◆ SetNonBlocking()

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 181 of file os_abstraction.h.

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