Changeset 9268 in orxonox.OLD for branches/proxy/src/lib
- Timestamp:
- Jul 13, 2006, 11:32:48 AM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/handshake.cc
r9263 r9268 43 43 errorString_handler = registerVarId( new SynchronizeableString( &localState.errorString, &remoteState.errorString, "errorString", PERMISSION_ALL ) ); 44 44 45 this->nodeTypeHandler = registerVarId( new SynchronizeableInt( &localState.nodeType, &remoteState.nodeType, "nodeType", PERMISSION_ALL ) ); 46 45 47 candel_id = registerVarId( new SynchronizeableInt( &localState.canDel, &remoteState.canDel, "canDel", PERMISSION_ALL ) ); 46 48 … … 56 58 localState.orxId = _ORXONOX_ID; 57 59 localState.version = _ORXONOX_VERSION; 60 // localState.nodeType = 58 61 localState.canDel = 0; 59 62 -
branches/proxy/src/lib/network/handshake.h
r9262 r9268 12 12 13 13 struct HandshakeState { 14 int orxId; 15 int version; 14 int orxId; //!< orxonox id 15 int version; //!< network protocol version 16 16 17 int networkManagerId; 18 int messageManagerId; 19 int hostId; 17 int networkManagerId; //!< unique id of the network manager 18 int messageManagerId; //!< unique id of the message manager 19 int hostId; //!< host id 20 int nodeType; //!< type of the network node 20 21 21 int completed; 22 int canDel; 22 int completed; //!< true if completed 23 int canDel; //!< true if marked for deletion 23 24 24 int error; 25 int error; //!< error number 25 26 26 std::string errorString; 27 std::string errorString; //!< error string 27 28 28 29 //additional data 29 std::string preferedNickName; 30 std::string preferedNickName; //!< prefered nick name 30 31 }; 31 32 … … 77 78 int msgManId_handler; //!< message manager handler 78 79 int hostId_handler; //!< host id handler 79 int serverAddressHandler; //!< server addresshandler80 int nodeTypeHandler; //!< node type handler 80 81 81 82 int completed_handler; //!< handshake completion handler … … 83 84 int errorString_handler; //!< handshake error string handler 84 85 int candel_id; //!< handshake deletion handler 86 int nodeType; //!, the type of the network node 85 87 86 88 }; -
branches/proxy/src/lib/network/network_stream.cc
r9256 r9268 26 26 #include "udp_server_socket.h" 27 27 #include "connection_monitor.h" 28 #include "network_monitor.h" 28 29 #include "synchronizeable.h" 29 30 #include "network_game_manager.h" … … 45 46 #include <algorithm> 46 47 47 /* include your own header */ 48 48 49 #include "network_stream.h" 49 50 50 /* probably unnecessary */ 51 51 52 using namespace std; 52 53 … … 792 793 /** 793 794 * is executed when a handshake has finished 794 * @todo create playable for new user795 795 */ 796 796 void NetworkStream::handleNewClient( int userId ) 797 797 { 798 // init and assign the message manager 798 799 MessageManager::getInstance()->initUser( userId ); 799 800 // do all game relevant stuff here 800 801 networkGameManager->signalNewPlayer( userId ); 801 } 802 803 // register the new client at the network monitor 804 // this->networkMonitor->addClient(); 805 } 806 802 807 803 808 /** -
branches/proxy/src/lib/network/network_stream.h
r9255 r9268 22 22 class ServerSocket; 23 23 class NetworkGameManager; 24 class NetworkMonitor; 24 25 25 26 … … 66 67 67 68 private: 69 68 70 inline SynchronizeableList::const_iterator getSyncBegin(){ return synchronizeables.begin(); } 69 71 inline SynchronizeableList::const_iterator getSyncEnd(){ return synchronizeables.end(); } 70 72 inline PeerInfo & getPeerInfo( int userId ) { return peers[userId]; } 71 73 void cleanUpOldSyncList(); 72 74 int getSyncCount(); 73 75 74 76 void updateConnectionList(); 77 75 78 void handleHandshakes(); 76 79 void handleUpstream( int tick ); 77 80 void handleDownstream(int tick ); 78 81 void handleNewClient( int userId ); 79 void cleanUpOldSyncList(); 82 80 83 81 84 void writeToNewDict( byte * data, int length, bool upstream ); … … 91 94 int currentState; //!< current state id 92 95 96 NetworkMonitor* networkMonitor; //!< the network monitor 93 97 NetworkGameManager* networkGameManager; //!< reference to the network game manager 94 98 ServerSocket* serverSocket; //!< the listening socket of the server
Note: See TracChangeset
for help on using the changeset viewer.