Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8494 in orxonox.OLD


Ignore:
Timestamp:
Jun 15, 2006, 9:50:26 PM (18 years ago)
Author:
rennerc
Message:

write dict creates two files, one for upstream and one for downstream

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

Legend:

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

    r8481 r8494  
    515515   
    516516    if ( this->remainingBytesToWriteToDict > 0 )
    517       writeToNewDict( buf, offset );
     517      writeToNewDict( buf, offset, true );
    518518   
    519519    peer->second.connectionMonitor->processUnzippedOutgoingPacket( tick, buf, offset, currentState );
     
    561561     
    562562      if ( this->remainingBytesToWriteToDict > 0 )
    563         writeToNewDict( buf, packetLength );
     563        writeToNewDict( buf, packetLength, false );
    564564   
    565565      assert( Converter::byteArrayToInt( buf, &length ) == INTSIZE );
     
    743743 * @param length length
    744744 */
    745 void NetworkStream::writeToNewDict( byte * data, int length )
     745void NetworkStream::writeToNewDict( byte * data, int length, bool upstream )
    746746{
    747747  if ( remainingBytesToWriteToDict <= 0 )
     
    753753  std::string fileName = ResourceManager::getInstance()->getDataDir();
    754754  fileName += "/dicts/newdict";
     755 
     756  if ( upstream )
     757    fileName += "_upstream";
     758  else
     759    fileName += "_downstream";
    755760 
    756761  FILE * f = fopen( fileName.c_str(), "a" );
  • branches/network/src/lib/network/network_stream.h

    r8068 r8494  
    8484    void cleanUpOldSyncList();
    8585   
    86     void writeToNewDict( byte * data, int length );
     86    void writeToNewDict( byte * data, int length, bool upstream );
    8787
    8888
Note: See TracChangeset for help on using the changeset viewer.