Changeset 5804 in orxonox.OLD for branches/network/src/lib/network/network_manager.cc
- Timestamp:
- Nov 28, 2005, 5:49:48 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/network_manager.cc
r5798 r5804 76 76 /* set the class id for the base object */ 77 77 this->setClassID(CL_NETWORK_MANAGER, "NetworkManager"); 78 78 79 79 /* initialize the references */ 80 80 this->netStreamList = NULL; 81 81 this->syncList = NULL; 82 82 83 83 PRINTF(0)("NetworkManager created\n"); 84 84 } … … 128 128 NetworkStream& NetworkManager::establishConnection(IPaddress& address, Synchronizeable& sync) 129 129 { 130 PRINTF(0)("Establish connection...\n");130 printf("Establish connection to server %s, on port %u\n", SDLNet_ResolveIP(&address), address.port); 131 131 /* creating a new network stream, it will register itself automaticaly to the class list */ 132 132 NetworkStream* netStream = new NetworkStream(address, sync, NET_CLIENT); … … 137 137 * @param sync: the listener 138 138 */ 139 NetworkStream& NetworkManager::createServer(Synchronizeable& sync, int port)139 NetworkStream& NetworkManager::createServer(Synchronizeable& sync, unsigned int port) 140 140 { 141 PRINTF(0)("Create a new server socket...\n");141 printf("Create a new server socket, liestening on port %u...\n", port); 142 142 /* creating a new network stream, it will register itself automaticaly to the class list */ 143 143 NetworkStream* netStream = new NetworkStream(sync, port, NET_SERVER); … … 160 160 void NetworkManager::synchronize() 161 161 { 162 PRINTF(0)("NetworkManager synchronizes\n");163 162 if (this->netStreamList != NULL || (this->netStreamList = ClassList::getList(CL_NETWORK_STREAM)) != NULL) 164 163 { … … 167 166 while( stream) 168 167 { 169 printf("NetworkManager::synchronize ");170 if(stream->isServer()) printf("Server\n"); else printf("Client\n");171 168 stream->processData(); 172 169 stream = (NetworkStream*)(iterator->nextElement());
Note: See TracChangeset
for help on using the changeset viewer.