Changeset 6250 in orxonox.OLD for branches/network/src/lib/network/network_manager.cc
- Timestamp:
- Dec 21, 2005, 4:29:15 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/network_manager.cc
r6239 r6250 44 44 /* set the class id for the base object */ 45 45 this->setClassID(CL_NETWORK_MANAGER, "NetworkManager"); 46 PRINTF(0)("START\n"); 46 47 47 48 /* initialize the references */ … … 49 50 this->syncList = NULL; 50 51 this->tmpStream = NULL; 52 51 53 this->hostID = -1; 52 54 this->bGameServer = false; … … 107 109 int NetworkManager::createServer(unsigned int port) 108 110 { 111 this->hostID = 0; 112 this->bGameServer = true; 109 113 this->tmpStream = new NetworkStream(port); 110 114 this->bGameServer = true; … … 124 128 this->tmpStream = new NetworkStream(address); 125 129 this->tmpStream->connectSynchronizeable(sync); 126 }127 128 129 /**130 * creates a new NetworkStream of server type131 * @param sync: the listener132 */133 NetworkStream& NetworkManager::createServer(Synchronizeable& sync, unsigned int port)134 {135 PRINTF(0)("Create a new server socket\n");136 /* creating a new network stream, it will register itself automaticaly to the class list */137 this->tmpStream = new NetworkStream(port);138 this->tmpStream->connectSynchronizeable(sync);139 this->bGameServer = true;140 130 } 141 131 … … 178 168 void NetworkManager::setHostID(int id) 179 169 { 180 this->hostID = id;170 this->hostID = id; 181 171 }
Note: See TracChangeset
for help on using the changeset viewer.