# core.h File Reference

Base for all network types (UDP and TCP). More...

`#include "../../newgrf_config.h"`

Go to the source code of this file.

## Data Structures
class | NetworkSocketHandler
| SocketHandler for all network sockets in OpenTTD. More...
## Enumerations
enum | NetworkRecvStatus { NETWORK_RECV_STATUS_OKAY, NETWORK_RECV_STATUS_DESYNC, NETWORK_RECV_STATUS_NEWGRF_MISMATCH, NETWORK_RECV_STATUS_SAVEGAME, NETWORK_RECV_STATUS_CONN_LOST, NETWORK_RECV_STATUS_MALFORMED_PACKET, NETWORK_RECV_STATUS_SERVER_ERROR, NETWORK_RECV_STATUS_SERVER_FULL, NETWORK_RECV_STATUS_SERVER_BANNED, NETWORK_RECV_STATUS_CLOSE_QUERY }
| Status of a network client; reasons why a client has quit. More...
## Functions
bool | NetworkCoreInitialize ()
| Initializes the network core (as that is needed for some platforms.
void | NetworkCoreShutdown ()
| Shuts down the network core (as that is needed for some platforms.

## Detailed Description

Base for all network types (UDP and TCP).

Definition in file core.h.

## Enumeration Type Documentation

enum NetworkRecvStatus

Status of a network client; reasons why a client has quit.

Enumerator:

  NETWORK_RECV_STATUS_OKAY | Everything is okay.
  NETWORK_RECV_STATUS_DESYNC | A desync did occur.
  NETWORK_RECV_STATUS_NEWGRF_MISMATCH | We did not have the required NewGRFs.
  NETWORK_RECV_STATUS_SAVEGAME | Something went wrong (down)loading the savegame.
  NETWORK_RECV_STATUS_CONN_LOST | The conection is 'just' lost.
  NETWORK_RECV_STATUS_MALFORMED_PACKET | We apparently send a malformed packet.
  NETWORK_RECV_STATUS_SERVER_ERROR | The server told us we made an error.
  NETWORK_RECV_STATUS_SERVER_FULL | The server is full.
  NETWORK_RECV_STATUS_SERVER_BANNED | The server has banned us.
  NETWORK_RECV_STATUS_CLOSE_QUERY | Done quering the server.

Definition at line 25 of file core.h.

## Function Documentation

bool NetworkCoreInitialize | ( |  | ) |

Initializes the network core (as that is needed for some platforms.

Returns:
  true if the core has been initialized, false otherwise

Definition at line 31 of file core.cpp.

Referenced by NetworkStartUp().