Changeset 8858 for code/trunk/src/libraries/network/ClientConnection.cc
- Timestamp:
- Aug 23, 2011, 12:45:53 AM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore
-
old new 1 1 build 2 2 codeblocks 3 vs 3 4 dependencies
-
- Property svn:mergeinfo changed
/code/branches/output (added) merged: 8739-8740,8765,8771-8772,8774-8780,8787-8789,8794-8799,8801,8803-8812,8814,8816-8817,8820,8822,8825-8837,8840,8844,8846,8848-8850,8853-8854
- Property svn:ignore
-
code/trunk/src/libraries/network/ClientConnection.cc
r8327 r8858 32 32 #define WIN32_LEAN_AND_MEAN 33 33 #include <enet/enet.h> 34 #include "util/ Debug.h"34 #include "util/Output.h" 35 35 36 36 namespace orxonox … … 60 60 void ClientConnection::setServerAddress( const std::string& serverAddress ) { 61 61 if (enet_address_set_host (this->serverAddress_, serverAddress.c_str()) < 0) 62 COUT(1) << "Error: Could not resolve \"" << serverAddress << "\"." << std::endl;62 orxout(internal_error, context::network) << "Could not resolve \"" << serverAddress << "\"." << endl; 63 63 } 64 64 … … 76 76 if ( this->host_ == NULL ) 77 77 { 78 COUT(1) << "ClientConnection: host_ == NULL" << std::endl;78 orxout(internal_error, context::network) << "ClientConnection: host_ == NULL" << endl; 79 79 // error handling 80 80 return false; … … 86 86 assert( this->host_->socket4 != ENET_SOCKET_NULL || this->host_->socket6 != ENET_SOCKET_NULL ); 87 87 if (this->host_->socket4 == ENET_SOCKET_NULL) 88 COUT(2) << "Warning: IPv4 Socket failed." << std::endl;88 orxout(internal_warning, context::network) << "IPv4 Socket failed." << endl; 89 89 else if (this->host_->socket6 == ENET_SOCKET_NULL) 90 COUT(2) << "Warning: IPv6 Socket failed." << std::endl;90 orxout(internal_warning, context::network) << "IPv6 Socket failed." << endl; 91 91 else 92 COUT(3) << "Info: Using IPv4 and IPv6 Sockets." << std::endl;92 orxout(internal_info, context::network) << "Using IPv4 and IPv6 Sockets." << endl; 93 93 94 94 this->server_ = enet_host_connect(this->host_, serverAddress_, NETWORK_CHANNEL_COUNT, 0); 95 95 if ( this->server_==NULL ) 96 96 { 97 COUT(1) << "ClientConnection: server_ == NULL" << std::endl;97 orxout(internal_error, context::network) << "ClientConnection: server_ == NULL" << endl; 98 98 // error handling 99 99 return false; … … 113 113 } 114 114 } 115 COUT(1) << "Could not connect to server" << endl;115 orxout(user_error, context::network) << "Could not connect to server" << endl; 116 116 return false; 117 117 } … … 140 140 break; 141 141 case ENET_EVENT_TYPE_DISCONNECT: 142 COUT(4) << "received disconnect confirmation from server" << endl;142 orxout(verbose, context::network) << "received disconnect confirmation from server" << endl; 143 143 this->connectionClosed(); 144 144 return true; … … 167 167 { 168 168 this->established_=false; 169 COUT(1) << "Received disconnect Packet from Server!" << endl;169 orxout(internal_error, context::network) << "Received disconnect Packet from Server!" << endl; 170 170 // server closed the connection 171 171 this->stopCommunicationThread();
Note: See TracChangeset
for help on using the changeset viewer.