Changeset 9494 in orxonox.OLD for trunk/src/lib/network/network_stream.h
- Timestamp:
- Jul 27, 2006, 10:44:28 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/network/network_stream.h
r9406 r9494 42 42 43 43 void connectToMasterServer(std::string host, int port); 44 void connectToProxyServer( std::string host, int port);45 void createServer(int port);44 void connectToProxyServer(int proxyId, std::string host, int port); 45 void createServer(int clientPort, int proxyPort); 46 46 47 47 void createNetworkGameManager(); 48 void startHandshake( );48 void startHandshake(int userId = NET_ID_MASTER_SERVER); 49 49 50 50 /* synchronizeable interface */ … … 55 55 56 56 /* functions for the peerInfo information retreival */ 57 /** @returns true if this userId is activated at this client false if not*/ 57 58 inline bool isUserIdActive( int userID ) { return (peers.find(userID) != peers.end()); } 59 /** @returns true if this userId is a local client */ 60 inline bool isUserLocal( int userID) { return this->isUserIdActive(userID); } 61 /** @returns true if this user is a master server */ 58 62 inline bool isUserMasterServer( int userID ){ if ( !isUserIdActive(userID) ) return false; return peers[userID].isMasterServer(); } 59 inline bool isUserProxyServer( int userID ){ if ( !isUserIdActive(userID) ) return false; return peers[userID].isProxyServer(); } 63 /** @returns true if this user is a proxy server */ 64 inline bool isUserProxyServerActive( int userID ){ if ( !isUserIdActive(userID) ) return false; return peers[userID].isProxyServerActive(); } 65 /** @returns true if this user is a client */ 60 66 inline bool isUserClient( int userID ){ if ( !isUserIdActive(userID) ) return false; return peers[userID].isClient(); } 61 67 … … 80 86 81 87 void updateConnectionList(); 88 82 89 /* handle processes */ 83 90 void handleHandshakes(); … … 87 94 /* handle events*/ 88 95 void handleNewClient( int userId ); 96 97 void handleConnect( int userId); 89 98 void handleReconnect( int userId ); 99 void handleDisconnect( int userId ); 90 100 91 101 void writeToNewDict( byte * data, int length, bool upstream ); … … 102 112 NetworkMonitor* networkMonitor; //!< the network monitor 103 113 NetworkGameManager* networkGameManager; //!< reference to the network game manager 104 ServerSocket* serverSocket; //!< the listening socket of the server 114 ServerSocket* clientSocket; //!< the listening socket of the server 115 ServerSocket* proxySocket; //!< socket for proxy connections 105 116 106 117 std::map<int,int> oldSynchronizeables; //!< used to save recently deleted sync ids to not recreate them … … 113 124 int dictServer; //!< the zip dict for the server 114 125 int dictClient; //!< the zip dict for the client 126 127 bool bRedirect; //!< true if the master server sent a redirect command 115 128 }; 116 129 #endif /* _NETWORK_STREAM */
Note: See TracChangeset
for help on using the changeset viewer.