diff options
author | rubidium <rubidium@openttd.org> | 2008-12-23 09:47:42 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-12-23 09:47:42 +0000 |
commit | cb8b31c3c144804d5ee9bb778809239c0f4ff0fc (patch) | |
tree | 981c844c6183f54a4240cfa3663094d557f7b865 /src/network/core | |
parent | 3ddde0c8d68753ed6eaa090559cd018dbbb8e214 (diff) | |
download | openttd-cb8b31c3c144804d5ee9bb778809239c0f4ff0fc.tar.xz |
(svn r14721) -Codechange: s/NetworkTCPSocketHandler/NetworkClientSocket/ as it's (way) more descriptive what it's used for.
Diffstat (limited to 'src/network/core')
-rw-r--r-- | src/network/core/tcp.cpp | 14 | ||||
-rw-r--r-- | src/network/core/tcp.h | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/network/core/tcp.cpp b/src/network/core/tcp.cpp index f6cef8728..5ce7d4831 100644 --- a/src/network/core/tcp.cpp +++ b/src/network/core/tcp.cpp @@ -18,7 +18,7 @@ #include "table/strings.h" /** Very ugly temporary hack !!! */ -void NetworkTCPSocketHandler::Initialize() +void NetworkClientSocket::Initialize() { this->sock = INVALID_SOCKET; @@ -37,7 +37,7 @@ void NetworkTCPSocketHandler::Initialize() this->command_queue = NULL; } -void NetworkTCPSocketHandler::Destroy() +void NetworkClientSocket::Destroy() { closesocket(this->sock); this->writable = false; @@ -67,7 +67,7 @@ void NetworkTCPSocketHandler::Destroy() * @return the new status * TODO: needs to be splitted when using client and server socket packets */ -NetworkRecvStatus NetworkTCPSocketHandler::CloseConnection() +NetworkRecvStatus NetworkClientSocket::CloseConnection() { NetworkCloseClient(this); @@ -90,7 +90,7 @@ NetworkRecvStatus NetworkTCPSocketHandler::CloseConnection() * if the OS-network-buffer is full) * @param packet the packet to send */ -void NetworkTCPSocketHandler::Send_Packet(Packet *packet) +void NetworkClientSocket::Send_Packet(Packet *packet) { Packet *p; assert(packet != NULL); @@ -116,7 +116,7 @@ void NetworkTCPSocketHandler::Send_Packet(Packet *packet) * data right now (full network-buffer, it happens ;)) * 3) sending took too long */ -bool NetworkTCPSocketHandler::Send_Packets() +bool NetworkClientSocket::Send_Packets() { ssize_t res; Packet *p; @@ -165,7 +165,7 @@ bool NetworkTCPSocketHandler::Send_Packets() * @param status the variable to store the status into * @return the received packet (or NULL when it didn't receive one) */ -Packet *NetworkTCPSocketHandler::Recv_Packet(NetworkRecvStatus *status) +Packet *NetworkClientSocket::Recv_Packet(NetworkRecvStatus *status) { ssize_t res; Packet *p; @@ -244,7 +244,7 @@ Packet *NetworkTCPSocketHandler::Recv_Packet(NetworkRecvStatus *status) return p; } -bool NetworkTCPSocketHandler::IsPacketQueueEmpty() +bool NetworkClientSocket::IsPacketQueueEmpty() { return this->packet_queue == NULL; } diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h index f956aa105..716d219af 100644 --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -85,7 +85,7 @@ enum ClientStatus { }; /** Base socket handler for all TCP sockets */ -class NetworkTCPSocketHandler : public NetworkSocketHandler { +class NetworkClientSocket : public NetworkSocketHandler { /* TODO: rewrite into a proper class */ private: Packet *packet_queue; ///< Packets that are awaiting delivery @@ -114,7 +114,7 @@ public: inline NetworkClientInfo *GetInfo() const { extern NetworkClientInfo _network_client_info[MAX_CLIENT_INFO]; - extern NetworkTCPSocketHandler _clients[MAX_CLIENTS]; + extern NetworkClientSocket _clients[MAX_CLIENTS]; return &_network_client_info[this - _clients]; } }; |