author | celestar |
Mon, 19 Mar 2007 12:38:16 +0000 | |
branch | gamebalance |
changeset 9895 | 7bd07f43b0e3 |
parent 6123 | 87aa45c64f8f |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
3 |
#ifndef NETWORK_DATA_H |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
4 |
#define NETWORK_DATA_H |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
5 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
6 |
// Is the network enabled? |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
7 |
#ifdef ENABLE_NETWORK |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
8 |
|
5720
cc0ceeafaa55
(svn r7751) -Codechange: move network_* to a new network map. Furthermore move the low level network functions to network/core, so they can be reused by the masterserver and website-serverlist-updater.
rubidium
parents:
5339
diff
changeset
|
9 |
#include "../openttd.h" |
cc0ceeafaa55
(svn r7751) -Codechange: move network_* to a new network map. Furthermore move the low level network functions to network/core, so they can be reused by the masterserver and website-serverlist-updater.
rubidium
parents:
5339
diff
changeset
|
10 |
#include "network.h" |
cc0ceeafaa55
(svn r7751) -Codechange: move network_* to a new network map. Furthermore move the low level network functions to network/core, so they can be reused by the masterserver and website-serverlist-updater.
rubidium
parents:
5339
diff
changeset
|
11 |
#include "core/os_abstraction.h" |
5875
4a1391019791
(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
rubidium
parents:
5870
diff
changeset
|
12 |
#include "core/core.h" |
5720
cc0ceeafaa55
(svn r7751) -Codechange: move network_* to a new network map. Furthermore move the low level network functions to network/core, so they can be reused by the masterserver and website-serverlist-updater.
rubidium
parents:
5339
diff
changeset
|
13 |
#include "core/config.h" |
cc0ceeafaa55
(svn r7751) -Codechange: move network_* to a new network map. Furthermore move the low level network functions to network/core, so they can be reused by the masterserver and website-serverlist-updater.
rubidium
parents:
5339
diff
changeset
|
14 |
#include "core/packet.h" |
5875
4a1391019791
(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
rubidium
parents:
5870
diff
changeset
|
15 |
#include "core/tcp.h" |
5720
cc0ceeafaa55
(svn r7751) -Codechange: move network_* to a new network map. Furthermore move the low level network functions to network/core, so they can be reused by the masterserver and website-serverlist-updater.
rubidium
parents:
5339
diff
changeset
|
16 |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
17 |
#define MAX_TEXT_MSG_LEN 1024 /* long long long long sentences :-) */ |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
18 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
19 |
// The client-info-server-index is always 1 |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
20 |
#define NETWORK_SERVER_INDEX 1 |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
21 |
#define NETWORK_EMPTY_INDEX 0 |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
22 |
|
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
6123
diff
changeset
|
23 |
enum MapPacket { |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
24 |
MAP_PACKET_START, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
25 |
MAP_PACKET_NORMAL, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
26 |
MAP_PACKET_END, |
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
6123
diff
changeset
|
27 |
}; |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
28 |
|
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
6123
diff
changeset
|
29 |
enum NetworkErrorCode { |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
30 |
NETWORK_ERROR_GENERAL, // Try to use thisone like never |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
31 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
32 |
// Signals from clients |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
33 |
NETWORK_ERROR_DESYNC, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
34 |
NETWORK_ERROR_SAVEGAME_FAILED, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
35 |
NETWORK_ERROR_CONNECTION_LOST, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
36 |
NETWORK_ERROR_ILLEGAL_PACKET, |
6123
87aa45c64f8f
(svn r8461) -Feature: check for NewGRF compatability before actually downloading the map from a game server when connecting from the command prompt and internal console.
rubidium
parents:
5875
diff
changeset
|
37 |
NETWORK_ERROR_NEWGRF_MISMATCH, |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
38 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
39 |
// Signals from servers |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
40 |
NETWORK_ERROR_NOT_AUTHORIZED, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
41 |
NETWORK_ERROR_NOT_EXPECTED, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
42 |
NETWORK_ERROR_WRONG_REVISION, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
43 |
NETWORK_ERROR_NAME_IN_USE, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
44 |
NETWORK_ERROR_WRONG_PASSWORD, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
45 |
NETWORK_ERROR_PLAYER_MISMATCH, // Happens in CLIENT_COMMAND |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
46 |
NETWORK_ERROR_KICKED, |
748
b48388344610
(svn r1204) -Add: [Network] Added some cheaters-protection (money-cheat mostly)
truelight
parents:
722
diff
changeset
|
47 |
NETWORK_ERROR_CHEATER, |
2879
d270cb37c0ec
(svn r3427) - Feature: Allow seeing and setting the maximum amount of companies and spectators for a server. This can be changed/viewed during runtime as well in the console.
Darkvater
parents:
2859
diff
changeset
|
48 |
NETWORK_ERROR_FULL, |
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
6123
diff
changeset
|
49 |
}; |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
50 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
51 |
// Actions that can be used for NetworkTextMessage |
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
6123
diff
changeset
|
52 |
enum NetworkAction { |
722
d0b031be5232
(svn r1174) -Fix: [Network] All strings can now be translated (no more hardcoded strings)
truelight
parents:
716
diff
changeset
|
53 |
NETWORK_ACTION_JOIN, |
d0b031be5232
(svn r1174) -Fix: [Network] All strings can now be translated (no more hardcoded strings)
truelight
parents:
716
diff
changeset
|
54 |
NETWORK_ACTION_LEAVE, |
4944
c61494b1ec35
(svn r6932) -Codechange: Send server messages with format NETWORK_ACTION_SERVER_MESSAGE so it is
Darkvater
parents:
4912
diff
changeset
|
55 |
NETWORK_ACTION_SERVER_MESSAGE, |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
56 |
NETWORK_ACTION_CHAT, |
4906
8a10678a62a3
(svn r6876) -Codechange: Change the naming of _PLAYER in DESTTYPE_PLAYER/NETWORK_ACTION_CHAT_PLAYER
Darkvater
parents:
4887
diff
changeset
|
57 |
NETWORK_ACTION_CHAT_COMPANY, |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
58 |
NETWORK_ACTION_CHAT_CLIENT, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
59 |
NETWORK_ACTION_GIVE_MONEY, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
60 |
NETWORK_ACTION_NAME_CHANGE, |
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
6123
diff
changeset
|
61 |
}; |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
62 |
|
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
6123
diff
changeset
|
63 |
enum NetworkPasswordType { |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
64 |
NETWORK_GAME_PASSWORD, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
65 |
NETWORK_COMPANY_PASSWORD, |
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
6123
diff
changeset
|
66 |
}; |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
67 |
|
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
6123
diff
changeset
|
68 |
enum DestType { |
4887
3fa54b371032
(svn r6824) -Feature: Change the functionality of the chat window. SHIFT+ENTER (SHIFT+T)
Darkvater
parents:
4883
diff
changeset
|
69 |
DESTTYPE_BROADCAST, ///< Send message/notice to all players (All) |
4906
8a10678a62a3
(svn r6876) -Codechange: Change the naming of _PLAYER in DESTTYPE_PLAYER/NETWORK_ACTION_CHAT_PLAYER
Darkvater
parents:
4887
diff
changeset
|
70 |
DESTTYPE_TEAM, ///< Send message/notice to everyone playing the same company (Team) |
4887
3fa54b371032
(svn r6824) -Feature: Change the functionality of the chat window. SHIFT+ENTER (SHIFT+T)
Darkvater
parents:
4883
diff
changeset
|
71 |
DESTTYPE_CLIENT, ///< Send message/notice to only a certain player (Private) |
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
6123
diff
changeset
|
72 |
}; |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
73 |
|
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5726
diff
changeset
|
74 |
// following externs are instantiated at network.cpp |
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5726
diff
changeset
|
75 |
extern CommandPacket *_local_command_queue; |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
76 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
77 |
// Here we keep track of the clients |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
78 |
// (and the client uses [0] for his own communication) |
5875
4a1391019791
(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
rubidium
parents:
5870
diff
changeset
|
79 |
extern NetworkTCPSocketHandler _clients[MAX_CLIENTS]; |
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5726
diff
changeset
|
80 |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
81 |
#define DEREF_CLIENT(i) (&_clients[i]) |
716
40a349345f82
(svn r1168) -Cleanup: [Network] Cleaned the network code a bit. Added 'const'
truelight
parents:
668
diff
changeset
|
82 |
// This returns the NetworkClientInfo from a NetworkClientState |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
83 |
#define DEREF_CLIENT_INFO(cs) (&_network_client_info[cs - _clients]) |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
84 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
85 |
// Macros to make life a bit more easier |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
86 |
#define DEF_CLIENT_RECEIVE_COMMAND(type) NetworkRecvStatus NetworkPacketReceive_ ## type ## _command(Packet *p) |
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
6123
diff
changeset
|
87 |
#define DEF_CLIENT_SEND_COMMAND(type) void NetworkPacketSend_ ## type ## _command() |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
88 |
#define DEF_CLIENT_SEND_COMMAND_PARAM(type) void NetworkPacketSend_ ## type ## _command |
5875
4a1391019791
(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
rubidium
parents:
5870
diff
changeset
|
89 |
#define DEF_SERVER_RECEIVE_COMMAND(type) void NetworkPacketReceive_ ## type ## _command(NetworkTCPSocketHandler *cs, Packet *p) |
4a1391019791
(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
rubidium
parents:
5870
diff
changeset
|
90 |
#define DEF_SERVER_SEND_COMMAND(type) void NetworkPacketSend_ ## type ## _command(NetworkTCPSocketHandler *cs) |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
91 |
#define DEF_SERVER_SEND_COMMAND_PARAM(type) void NetworkPacketSend_ ## type ## _command |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
92 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
93 |
#define SEND_COMMAND(type) NetworkPacketSend_ ## type ## _command |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
94 |
#define RECEIVE_COMMAND(type) NetworkPacketReceive_ ## type ## _command |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
95 |
|
5875
4a1391019791
(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
rubidium
parents:
5870
diff
changeset
|
96 |
#define FOR_ALL_CLIENTS(cs) for (cs = _clients; cs != endof(_clients) && cs->IsConnected(); cs++) |
4883
801b93ae218c
(svn r6820) -Codechange: Some more const correctness, coding style.
Darkvater
parents:
4880
diff
changeset
|
97 |
#define FOR_ALL_ACTIVE_CLIENT_INFOS(ci) for (ci = _network_client_info; ci != endof(_network_client_info); ci++) if (ci->client_index != NETWORK_EMPTY_INDEX) |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
98 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
99 |
void NetworkExecuteCommand(CommandPacket *cp); |
5875
4a1391019791
(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
rubidium
parents:
5870
diff
changeset
|
100 |
void NetworkAddCommandQueue(NetworkTCPSocketHandler *cs, CommandPacket *cp); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
101 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
102 |
// from network.c |
5875
4a1391019791
(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
rubidium
parents:
5870
diff
changeset
|
103 |
void NetworkCloseClient(NetworkTCPSocketHandler *cs); |
722
d0b031be5232
(svn r1174) -Fix: [Network] All strings can now be translated (no more hardcoded strings)
truelight
parents:
716
diff
changeset
|
104 |
void CDECL NetworkTextMessage(NetworkAction action, uint16 color, bool self_send, const char *name, const char *str, ...); |
5875
4a1391019791
(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
rubidium
parents:
5870
diff
changeset
|
105 |
void NetworkGetClientName(char *clientname, size_t size, const NetworkTCPSocketHandler *cs); |
4a1391019791
(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
rubidium
parents:
5870
diff
changeset
|
106 |
uint NetworkCalculateLag(const NetworkTCPSocketHandler *cs); |
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
6123
diff
changeset
|
107 |
byte NetworkGetCurrentLanguageIndex(); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
108 |
NetworkClientInfo *NetworkFindClientInfoFromIndex(uint16 client_index); |
2859
d45695cd3e98
(svn r3407) - Feature: Kick and ban now with IP numbers.
Darkvater
parents:
2498
diff
changeset
|
109 |
NetworkClientInfo *NetworkFindClientInfoFromIP(const char *ip); |
5875
4a1391019791
(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
rubidium
parents:
5870
diff
changeset
|
110 |
NetworkTCPSocketHandler *NetworkFindClientStateFromIndex(uint16 client_index); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
111 |
unsigned long NetworkResolveHost(const char *hostname); |
4912
d04b3f2bca70
(svn r6884) -Codechange: Add strict bounds checking in string formatting system.
Darkvater
parents:
4906
diff
changeset
|
112 |
char* GetNetworkErrorMsg(char* buf, NetworkErrorCode err, const char* last); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
113 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
114 |
#endif /* ENABLE_NETWORK */ |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
115 |
|
2436
177cb6a8339f
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2186
diff
changeset
|
116 |
#endif /* NETWORK_DATA_H */ |