Changeset 9600 in orxonox.OLD
- Timestamp:
- Jul 29, 2006, 9:59:20 AM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_manager.cc
r9538 r9600 179 179 180 180 /** 181 * reconnects this client to another server 182 * @param address new server address 183 */ 184 void NetworkManager::reconnectToServer(IP address) 185 { 186 PRINTF(0)("Rec. reconnection command\n"); 187 this->networkStream->reconnectToServer(address); 188 } 189 190 191 /** 181 192 * connects a synchronizeable to the network stream 182 193 * @param sync: synchronizeable to connect -
branches/proxy/src/lib/network/network_manager.h
r9494 r9600 39 39 int createProxyServer( unsigned int port); 40 40 41 void reconnectToServer(IP address); 42 41 43 void connectSynchronizeable(Synchronizeable& sync); 42 44 void synchronize(float dtS); -
branches/proxy/src/lib/network/network_stream.cc
r9598 r9600 741 741 742 742 743 744 /** 745 * reconnects to another server, with full handshake 746 * @param address of the new server 747 */ 748 void NetworkStream::reconnectToServer(IP address) 749 { 750 751 } 752 753 754 755 /** 756 * softly reconnecting to another server 757 * @param address of the new server 758 */ 759 void NetworkStream::softReconnectToServer(IP address) 760 { 761 762 } 763 764 743 765 /** 744 766 * handles the disconnect event -
branches/proxy/src/lib/network/network_stream.h
r9494 r9600 41 41 void init(); 42 42 43 /* network interface controls */ 43 44 void connectToMasterServer(std::string host, int port); 44 45 void connectToProxyServer(int proxyId, std::string host, int port); … … 47 48 void createNetworkGameManager(); 48 49 void startHandshake(int userId = NET_ID_MASTER_SERVER); 50 51 void reconnectToServer(IP address); 52 void softReconnectToServer(IP address); 53 49 54 50 55 /* synchronizeable interface */ -
branches/proxy/src/lib/network/proxy/proxy_control.cc
r9599 r9600 16 16 17 17 #include "class_list.h" 18 18 #include "shell_command.h" 19 19 20 20 #include "state.h" 21 21 #include "shared_network_data.h" 22 #include "network_manager.h" 22 23 #include "network_game_manager.h" 23 24 #include "ip.h" … … 35 36 ProxyControl* ProxyControl::singletonRef = NULL; 36 37 38 39 SHELL_COMMAND(forceReconnect, ProxyControl, forceReconnectionShell); 37 40 38 41 /** … … 227 230 228 231 232 /** 233 * a shell command wrapper 234 * @param userId the userId of the client/user :D 235 * @param serverId the userId of the server to connect to 236 */ 237 void ProxyControl::forceReconnectionShell(int userId, int serverId) 238 { 239 this->forceReconnection(userId, serverId); 240 } 241 229 242 230 243 /** … … 332 345 333 346 // handle it 334 if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()) 347 if( SharedNetworkData::getInstance()->getHostID() == userId && 348 (SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive())) 335 349 { 350 NetworkManager::getInstance()->reconnectToServer(IP(ipHost, 9999)); 336 351 } 337 352 break; -
branches/proxy/src/lib/network/proxy/proxy_control.h
r9599 r9600 43 43 44 44 /* proxy server network control */ 45 void forceReconnectionShell(int userId, int serverId); 45 46 void forceReconnection(int userId, int serverId); 46 47 void forceReconnection(int userId, IP newAddress);
Note: See TracChangeset
for help on using the changeset viewer.