# network_server.h File Reference

Server part of the network protocol. More...

`#include "network_internal.h"`
`#include "core/tcp_listen.h"`
`#include "../thread/thread.h"`

Go to the source code of this file.

## Data Structures
class | ServerNetworkGameSocketHandler
| Class for handling the server side of the game connection. More...
## Defines
#define | FOR_ALL_CLIENT_SOCKETS_FROM(var, start) FOR_ALL_ITEMS_FROM(NetworkClientSocket, clientsocket_index, var, start)
#define | FOR_ALL_CLIENT_SOCKETS(var) FOR_ALL_CLIENT_SOCKETS_FROM(var, 0)
## Typedefs
typedef ServerNetworkGameSocketHandler | NetworkClientSocket
typedef Pool < NetworkClientSocket, ClientIndex, 8, MAX_CLIENT_SLOTS > | NetworkClientSocketPool
## Functions
void | NetworkServer_Tick (bool send_frame)
void | NetworkServerSetCompanyPassword (CompanyID company_id, const char *password, bool already_hashed=true)
| Set/Reset a company password on the server end.
## Variables
NetworkClientSocketPool | _networkclientsocket_pool

## Detailed Description

Server part of the network protocol.

Definition in file network_server.h.

## Function Documentation

void NetworkServerSetCompanyPassword | ( | CompanyID | company_id,
|  | const char * | password,
|  | bool | already_hashed |
| ) |  |  |

Set/Reset a company password on the server end.

Parameters:

  | company_id | ID of the company the password should be changed for.
  | password | The new password.
  | already_hashed | Is the given password already hashed?

Definition at line 1667 of file network_server.cpp.

References _settings_client, _settings_game, GameSettings::game_creation, GenerateCompanyPasswordHash(), GameCreationSettings::generation_seed, Company::IsValidHumanID(), lastof, ClientSettings::network, NetworkSettings::network_id, strecpy(), and StrEmpty().

Referenced by NetworkChangeCompanyPassword().