Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 11, 2010, 9:07:55 PM (14 years ago)
Author:
smerkli
Message:

started implementing server pings, but need a change to masterservercomm soon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/libraries/network/Server.cc

    r7750 r7756  
    134134
    135135    /* make discoverable on WAN */
     136    /* TODO this needs to be optional, we need a switch from the UI to
     137     * enable/disable this
     138     */
    136139    helper_ConnectToMasterserver();
    137140
     
    169172
    170173
    171   /* TODO */
     174  /* handle incoming data */
    172175  int rephandler( char *addr, ENetEvent *ev )
    173176  {
    174     /* handle incoming data */
    175     /* TODO this is to be implemented. */
     177    /* reply to pings */
     178    if( !strncmp( (char *)ev->packet->data, MSPROTO_PING_GAMESERVER,
     179      MSPROTO_PING_GAMESERVER_LEN ) )
     180      //this->msc.sendRequest( MSPROTO_ACK );
     181      /* NOTE implement this after pollForReply
     182       * reimplementation
     183       */
     184      return 0;
    176185
    177186    /* done handling, return all ok code 0 */
     
    184193     * has to be done or changed.
    185194     */
    186     this->msc.pollForReply( rephandler );
     195    this->msc.pollForReply( rephandler, 10 );
    187196  }
    188197
Note: See TracChangeset for help on using the changeset viewer.