Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6667 in orxonox.OLD for branches/network


Ignore:
Timestamp:
Jan 24, 2006, 1:56:03 PM (19 years ago)
Author:
patrick
Message:

network: working on helper funciton

Location:
branches/network/src/lib/network
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/network_game_manager.cc

    r6666 r6667  
    9393      {
    9494        if ( !handleRequestRemove( i, data, length, sender ) )
     95          return i;
     96        continue;
     97      }
     98      if ( b == NET_REQUEST_PNODE_PATH )
     99      {
     100        if ( !handleRequestPNodePath( i, data, length, sender ) )
    95101          return i;
    96102        continue;
     
    862868}
    863869
     870
     871bool NetworkGameManager::handleRequestPNodePath(int& i, const byte* data, int length, int sender)
     872{}
     873
     874
    864875bool NetworkGameManager::writeToClientBuffer( clientBuffer & cb, byte b )
    865876{
  • branches/network/src/lib/network/network_game_manager.h

    r6666 r6667  
    1515
    1616class TiXmlElement;
     17class PNode;
    1718
    1819/**
     
    9293    void sendEntityList(int userID);
    9394
     95
    9496  private:
    9597    NetworkGameManager();
    9698
     99
     100    /* some network signal handlers */
     101    bool handleRequestCreate( int& i, const byte* data, int length, int sender );
     102    bool handleRequestRemove( int& i, const byte* data, int length, int sender );
     103    bool handleCreateEntity( int& i, const byte* data, int length, int sender );
     104    bool handleRemoveEntity( int& i, const byte* data, int length, int sender );
     105    bool handleCreateEntityList( int& i, const byte* data, int length, int sender );
     106    bool handleRemoveEntityList( int& i, const byte* data, int length, int sender );
     107    bool handleYouAreEntity( int& i, const byte* data, int length, int sender );
     108    bool handleRequestSync( int& i, const byte* data, int length, int sender );
     109    bool handleRequestPNodePath(int& i, const byte* data, int length, int sender);
     110
     111
     112    /* some network handlers helper functions */
    97113    void requestCreateEntity(ClassID classID);
    98114    int executeCreateEntity(ClassID classID, int uniqueID = 0, int owner = 0);
     115    BaseObject* doCreateEntity(ClassID classID, int uniqueID, int owner);
    99116
    100117    void requestRemoveEntity(int uniqueID);
    101118    void executeRemoveEntity(int uniqueID);
     119    void doRemoveEntity(int uniqueID);
    102120
    103121    void executeRequestSync( int uniqueID, int user );
     122    void doRequestSync(int uniqueID, int userID);
    104123
    105     BaseObject* doCreateEntity(ClassID classID, int uniqueID, int owner);
    106     void doRemoveEntity(int uniqueID);
    107     void doRequestSync(int uniqueID, int userID);
    108124    void doYouAre( int uniqueID );
     125
     126    void requestPNodePath(const PNode* node1, const PNode* node2);
     127    void executePNodePath(const PNode* node2, const PNode* node2);
     128    void doRequestPNodePath(const PNode* node1, const PNode* node2);
    109129
    110130    bool canCreateEntity(ClassID classID);
     
    114134    void resizeBufferVector(int n);
    115135
    116     inline bool writeToClientBuffer( clientBuffer &cb, byte*data, int length );
    117     inline bool writeToClientBuffer( clientBuffer &cb, byte b );
    118     inline bool writeToClientBuffer( clientBuffer &cb, int i );
    119     inline bool readFromClientBuffer( clientBuffer &cb, byte*data, int length );
     136    bool writeToClientBuffer( clientBuffer &cb, byte*data, int length );
     137    bool writeToClientBuffer( clientBuffer &cb, byte b );
     138    bool writeToClientBuffer( clientBuffer &cb, int i );
     139    bool readFromClientBuffer( clientBuffer &cb, byte*data, int length );
    120140
    121     //helper functions for writeBytes
    122     inline bool handleRequestCreate( int& i, const byte* data, int length, int sender );
    123     inline bool handleRequestRemove( int& i, const byte* data, int length, int sender );
    124     inline bool handleCreateEntity( int& i, const byte* data, int length, int sender );
    125     inline bool handleRemoveEntity( int& i, const byte* data, int length, int sender );
    126     inline bool handleCreateEntityList( int& i, const byte* data, int length, int sender );
    127     inline bool handleRemoveEntityList( int& i, const byte* data, int length, int sender );
    128     inline bool handleYouAreEntity( int& i, const byte* data, int length, int sender );
    129     inline bool handleRequestSync( int& i, const byte* data, int length, int sender );
     141
    130142
    131143  private:
  • branches/network/src/lib/network/network_socket.cc

    r6634 r6667  
    9797/**
    9898 * Default destructor
     99 * dont use this from outside: use destroy() instead!!
    99100 */
    100101NetworkSocket::~NetworkSocket( )
  • branches/network/src/lib/network/network_socket.h

    r6139 r6667  
    8181  void init();
    8282
    83   //dont make this public use destroy() instead
    84   ~NetworkSocket();
    85 
    8683public:
    8784
    8885  NetworkSocket();
     86  ~NetworkSocket();
    8987  NetworkSocket(IPaddress ip);
    9088  NetworkSocket(TCPsocket sock);
Note: See TracChangeset for help on using the changeset viewer.