diff options
author | rubidium <rubidium@openttd.org> | 2010-11-30 13:38:46 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-11-30 13:38:46 +0000 |
commit | b6c2216749765e4d29fc3fa05dc1023c2c643cce (patch) | |
tree | abc3302f27c09c0e0494f4691e5989aa514116e2 /src/network/core | |
parent | 9c83a8975fe93568d4a3c44bd273e846b18d8e3f (diff) | |
download | openttd-b6c2216749765e4d29fc3fa05dc1023c2c643cce.tar.xz |
(svn r21358) -Codechange: make some network function names conform to coding style
Diffstat (limited to 'src/network/core')
-rw-r--r-- | src/network/core/core.cpp | 4 | ||||
-rw-r--r-- | src/network/core/core.h | 6 | ||||
-rw-r--r-- | src/network/core/tcp.cpp | 6 | ||||
-rw-r--r-- | src/network/core/tcp.h | 6 | ||||
-rw-r--r-- | src/network/core/tcp_admin.cpp | 6 | ||||
-rw-r--r-- | src/network/core/tcp_admin.h | 6 | ||||
-rw-r--r-- | src/network/core/tcp_content.cpp | 6 | ||||
-rw-r--r-- | src/network/core/tcp_content.h | 2 | ||||
-rw-r--r-- | src/network/core/tcp_game.cpp | 6 | ||||
-rw-r--r-- | src/network/core/tcp_game.h | 6 | ||||
-rw-r--r-- | src/network/core/tcp_listen.h | 2 | ||||
-rw-r--r-- | src/network/core/udp.cpp | 8 | ||||
-rw-r--r-- | src/network/core/udp.h | 4 |
13 files changed, 34 insertions, 34 deletions
diff --git a/src/network/core/core.cpp b/src/network/core/core.cpp index 4c724e47e..fc1bbf954 100644 --- a/src/network/core/core.cpp +++ b/src/network/core/core.cpp @@ -103,7 +103,7 @@ void NetworkCoreShutdown() * @param p the packet to write the data to * @param grf the GRFIdentifier to serialize */ -void NetworkSocketHandler::Send_GRFIdentifier(Packet *p, const GRFIdentifier *grf) +void NetworkSocketHandler::SendGRFIdentifier(Packet *p, const GRFIdentifier *grf) { uint j; p->Send_uint32(grf->grfid); @@ -117,7 +117,7 @@ void NetworkSocketHandler::Send_GRFIdentifier(Packet *p, const GRFIdentifier *gr * @param p the packet to read the data from * @param grf the GRFIdentifier to deserialize */ -void NetworkSocketHandler::Recv_GRFIdentifier(Packet *p, GRFIdentifier *grf) +void NetworkSocketHandler::ReceiveGRFIdentifier(Packet *p, GRFIdentifier *grf) { uint j; grf->grfid = p->Recv_uint32(); diff --git a/src/network/core/core.h b/src/network/core/core.h index bf013909a..932199a9c 100644 --- a/src/network/core/core.h +++ b/src/network/core/core.h @@ -74,9 +74,9 @@ public: */ void Reopen() { this->has_quit = false; } - void Send_GRFIdentifier(Packet *p, const GRFIdentifier *grf); - void Recv_GRFIdentifier(Packet *p, GRFIdentifier *grf); - void Send_CompanyInformation(Packet *p, const struct Company *c, const struct NetworkCompanyStats *stats); + void SendGRFIdentifier(Packet *p, const GRFIdentifier *grf); + void ReceiveGRFIdentifier(Packet *p, GRFIdentifier *grf); + void SendCompanyInformation(Packet *p, const struct Company *c, const struct NetworkCompanyStats *stats); }; #endif /* ENABLE_NETWORK */ diff --git a/src/network/core/tcp.cpp b/src/network/core/tcp.cpp index c35b029a2..66f19107c 100644 --- a/src/network/core/tcp.cpp +++ b/src/network/core/tcp.cpp @@ -56,7 +56,7 @@ NetworkRecvStatus NetworkTCPSocketHandler::CloseConnection(bool error) * if the OS-network-buffer is full) * @param packet the packet to send */ -void NetworkTCPSocketHandler::Send_Packet(Packet *packet) +void NetworkTCPSocketHandler::SendPacket(Packet *packet) { Packet *p; assert(packet != NULL); @@ -90,7 +90,7 @@ void NetworkTCPSocketHandler::Send_Packet(Packet *packet) * @return \c true if a (part of a) packet could be sent and * the connection is not closed yet. */ -bool NetworkTCPSocketHandler::Send_Packets(bool closing_down) +bool NetworkTCPSocketHandler::SendPackets(bool closing_down) { ssize_t res; Packet *p; @@ -141,7 +141,7 @@ bool NetworkTCPSocketHandler::Send_Packets(bool closing_down) * @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() +Packet *NetworkTCPSocketHandler::ReceivePacket() { ssize_t res; diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h index 86c568edf..899eba771 100644 --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -35,11 +35,11 @@ public: bool IsConnected() const { return this->sock != INVALID_SOCKET; } virtual NetworkRecvStatus CloseConnection(bool error = true); - void Send_Packet(Packet *packet); - bool Send_Packets(bool closing_down = false); + void SendPacket(Packet *packet); + bool SendPackets(bool closing_down = false); bool IsPacketQueueEmpty(); - Packet *Recv_Packet(); + Packet *ReceivePacket(); bool CanSendReceive(); diff --git a/src/network/core/tcp_admin.cpp b/src/network/core/tcp_admin.cpp index e3235eebe..aaa3c425a 100644 --- a/src/network/core/tcp_admin.cpp +++ b/src/network/core/tcp_admin.cpp @@ -100,11 +100,11 @@ NetworkRecvStatus NetworkAdminSocketHandler::HandlePacket(Packet *p) * HandlePacket is returned. * @return #NetworkRecvStatus of the last handled packet. */ -NetworkRecvStatus NetworkAdminSocketHandler::Recv_Packets() +NetworkRecvStatus NetworkAdminSocketHandler::ReceivePackets() { Packet *p; - while ((p = this->Recv_Packet()) != NULL) { - NetworkRecvStatus res = HandlePacket(p); + while ((p = this->ReceivePacket()) != NULL) { + NetworkRecvStatus res = this->HandlePacket(p); if (res != NETWORK_RECV_STATUS_OKAY) return res; } diff --git a/src/network/core/tcp_admin.h b/src/network/core/tcp_admin.h index 82121ce73..ee1e6f2db 100644 --- a/src/network/core/tcp_admin.h +++ b/src/network/core/tcp_admin.h @@ -347,10 +347,10 @@ public: NetworkAdminSocketHandler(SOCKET s); ~NetworkAdminSocketHandler(); - NetworkRecvStatus Recv_Packets(); + NetworkRecvStatus ReceivePackets(); - const char *Recv_Command(Packet *p, CommandPacket *cp); - void Send_Command(Packet *p, const CommandPacket *cp); + const char *ReceiveCommand(Packet *p, CommandPacket *cp); + void SendCommand(Packet *p, const CommandPacket *cp); }; #endif /* ENABLE_NETWORK */ diff --git a/src/network/core/tcp_content.cpp b/src/network/core/tcp_content.cpp index 0cf03d7fa..17b7da048 100644 --- a/src/network/core/tcp_content.cpp +++ b/src/network/core/tcp_content.cpp @@ -117,11 +117,11 @@ bool NetworkContentSocketHandler::HandlePacket(Packet *p) /** * Receive a packet at TCP level */ -void NetworkContentSocketHandler::Recv_Packets() +void NetworkContentSocketHandler::ReceivePackets() { Packet *p; - while ((p = this->Recv_Packet()) != NULL) { - bool cont = HandlePacket(p); + while ((p = this->ReceivePacket()) != NULL) { + bool cont = this->HandlePacket(p); delete p; if (!cont) return; } diff --git a/src/network/core/tcp_content.h b/src/network/core/tcp_content.h index 24f9f648b..f9ff4be35 100644 --- a/src/network/core/tcp_content.h +++ b/src/network/core/tcp_content.h @@ -210,7 +210,7 @@ public: virtual ~NetworkContentSocketHandler() { this->Close(); } /** Do the actual receiving of packets. */ - void Recv_Packets(); + void ReceivePackets(); }; #endif /* ENABLE_NETWORK */ diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp index 258f9c6b2..6c68217fc 100644 --- a/src/network/core/tcp_game.cpp +++ b/src/network/core/tcp_game.cpp @@ -34,7 +34,7 @@ NetworkGameSocketHandler::NetworkGameSocketHandler(SOCKET s) } /** - * Functions to help NetworkRecv_Packet/NetworkSend_Packet a bit + * Functions to help ReceivePacket/SendPacket a bit * A socket can make errors. When that happens this handles what to do. * For clients: close connection and drop back to main-menu * For servers: close connection and that is it @@ -136,10 +136,10 @@ NetworkRecvStatus NetworkGameSocketHandler::HandlePacket(Packet *p) * HandlePacket is returned. * @return #NetworkRecvStatus of the last handled packet. */ -NetworkRecvStatus NetworkGameSocketHandler::Recv_Packets() +NetworkRecvStatus NetworkGameSocketHandler::ReceivePackets() { Packet *p; - while ((p = this->Recv_Packet()) != NULL) { + while ((p = this->ReceivePacket()) != NULL) { NetworkRecvStatus res = HandlePacket(p); delete p; if (res != NETWORK_RECV_STATUS_OKAY) return res; diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h index b4a6999cd..be737554e 100644 --- a/src/network/core/tcp_game.h +++ b/src/network/core/tcp_game.h @@ -482,10 +482,10 @@ public: inline void SetInfo(NetworkClientInfo *info) { assert(info != NULL && this->info == NULL); this->info = info; } inline NetworkClientInfo *GetInfo() const { return this->info; } - NetworkRecvStatus Recv_Packets(); + NetworkRecvStatus ReceivePackets(); - const char *Recv_Command(Packet *p, CommandPacket *cp); - void Send_Command(Packet *p, const CommandPacket *cp); + const char *ReceiveCommand(Packet *p, CommandPacket *cp); + void SendCommand(Packet *p, const CommandPacket *cp); }; #endif /* ENABLE_NETWORK */ diff --git a/src/network/core/tcp_listen.h b/src/network/core/tcp_listen.h index 83a7f2fd8..0223ad42f 100644 --- a/src/network/core/tcp_listen.h +++ b/src/network/core/tcp_listen.h @@ -129,7 +129,7 @@ public: FOR_ALL_ITEMS_FROM(Tsocket, idx, cs, 0) { cs->writable = !!FD_ISSET(cs->sock, &write_fd); if (FD_ISSET(cs->sock, &read_fd)) { - cs->Recv_Packets(); + cs->ReceivePackets(); } } return _networking; diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp index b153cdf88..54b00f30e 100644 --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -151,7 +151,7 @@ void NetworkUDPSocketHandler::ReceivePackets() * @param p the packet to write the data to * @param info the NetworkGameInfo struct to serialize */ -void NetworkUDPSocketHandler::Send_NetworkGameInfo(Packet *p, const NetworkGameInfo *info) +void NetworkUDPSocketHandler::SendNetworkGameInfo(Packet *p, const NetworkGameInfo *info) { p->Send_uint8 (NETWORK_GAME_INFO_VERSION); @@ -180,7 +180,7 @@ void NetworkUDPSocketHandler::Send_NetworkGameInfo(Packet *p, const NetworkGameI /* Send actual GRF Identifications */ for (c = info->grfconfig; c != NULL; c = c->next) { - if (!HasBit(c->flags, GCF_STATIC)) this->Send_GRFIdentifier(p, &c->ident); + if (!HasBit(c->flags, GCF_STATIC)) this->SendGRFIdentifier(p, &c->ident); } } @@ -213,7 +213,7 @@ void NetworkUDPSocketHandler::Send_NetworkGameInfo(Packet *p, const NetworkGameI * @param p the packet to read the data from * @param info the NetworkGameInfo to deserialize into */ -void NetworkUDPSocketHandler::Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *info) +void NetworkUDPSocketHandler::ReceiveNetworkGameInfo(Packet *p, NetworkGameInfo *info) { static const Date MAX_DATE = ConvertYMDToDate(MAX_YEAR, 11, 31); // December is month 11 @@ -238,7 +238,7 @@ void NetworkUDPSocketHandler::Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *i for (i = 0; i < num_grfs; i++) { GRFConfig *c = new GRFConfig(); - this->Recv_GRFIdentifier(p, &c->ident); + this->ReceiveGRFIdentifier(p, &c->ident); this->HandleIncomingNetworkGameInfoGRFConfig(c); /* Append GRFConfig to the list */ diff --git a/src/network/core/udp.h b/src/network/core/udp.h index 82435d9ff..b94fb4738 100644 --- a/src/network/core/udp.h +++ b/src/network/core/udp.h @@ -153,8 +153,8 @@ public: void SendPacket(Packet *p, NetworkAddress *recv, bool all = false, bool broadcast = false); void ReceivePackets(); - void Send_NetworkGameInfo(Packet *p, const NetworkGameInfo *info); - void Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *info); + void SendNetworkGameInfo(Packet *p, const NetworkGameInfo *info); + void ReceiveNetworkGameInfo(Packet *p, NetworkGameInfo *info); }; #endif /* ENABLE_NETWORK */ |