Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7750


Ignore:
Timestamp:
Dec 8, 2010, 7:33:11 PM (13 years ago)
Author:
smerkli
Message:

documentation.

Location:
code/branches/presentation/src/libraries/network
Files:
5 edited

Legend:

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

    r7743 r7750  
    6161        != mainlist.serverlist.end(); ++i )
    6262    {
    63       /* WORK MARK */
    6463      /* send this particular server */
    6564      /* build reply string */
     
    8887    }
    8988
    90     /* send end-of-list packet */
     89    /* create end-of-list packet */
    9190    reply = enet_packet_create( MSPROTO_SERVERLIST_END,
    9291        MSPROTO_SERVERLIST_END_LEN + 1,
    9392        ENET_PACKET_FLAG_RELIABLE );
    9493
     94    /* send end-of-list packet */
    9595    enet_peer_send( event->peer, 0, reply );
    9696
     
    159159  { /* validate packet */
    160160    if( !event || !(event->packet) || !(event->peer) )
    161       //|| !(event->packet->data) || !strlen(event->packet->data) )
    162161    { COUT(2) << "No complete event given.\n";
    163162      return -1;
     
    168167    enet_address_get_host_ip( &(event->peer->address), addrconv, 49 );
    169168
    170     /* DEBUG */
    171     /* output debug info about the data that has come, to be removed */
     169    /* output debug info about the data that has come */
    172170    helper_output_debug( event, addrconv );
    173171
     
    275273
    276274    /***** INITIALIZE GAME SERVER AND PEER LISTS *****/
    277     //this->mainlist = new ServerList();
    278275    this->peers = new PeerList();
    279276
     
    292289    /* clear the list of connected game servers */
    293290    /* clear the list of connected game clients */
    294 
    295291  }
    296292
  • code/branches/presentation/src/libraries/network/MasterServerProtocol.h

    r7739 r7750  
    3333#define MS_ADDRESS "129.132.3.8"
    3434
     35/* Client token (shows that the party sending data is a client */
    3536#define MSPROTO_CLIENT "CL"
    3637#define MSPROTO_CLIENT_LEN 2
    3738
     39/* Request: Serverlist (requiest made from client to master server */
    3840#define MSPROTO_REQ_LIST "REQ:LIST"
    3941#define MSPROTO_REQ_LIST_LEN 8
     
    4244
    4345
     46/* Game server token (shows that the party sending data is a game server) */
    4447#define MSPROTO_GAME_SERVER "GS"
    4548#define MSPROTO_GAME_SERVER_LEN 2
    4649
     50/* Register game server at the master server, meaning request to be taken into$
     51 * the master servers game server list.
     52 */
    4753#define MSPROTO_REGISTER_SERVER "REG:SER"
    4854#define MSPROTO_REGISTER_SERVER_LEN 7
    4955
     56/* Server list item token */
    5057#define MSPROTO_SERVERLIST_ITEM "SI"
    5158#define MSPROTO_SERVERLIST_ITEM_LEN 2
     59
     60/* server list end token */
    5261#define MSPROTO_SERVERLIST_END "SL_END"
    5362#define MSPROTO_SERVERLIST_END_LEN 6
     
    5564
    5665
    57 
    58 
    59 
     66/* default master server port */
    6067#define ORX_MSERVER_PORT 55566
    6168
    6269
     70/* some constants for the networking of the master server, not very important.
     71 * play with those if things don't work out well.$
     72 */
    6373#define ORX_MSERVER_MAXCONNS 32
    6474#define ORX_MSERVER_MAXCHANS 2
    6575
    6676
    67 
    68 
    6977#endif /* MASTER_SERVER_PROTO */
  • code/branches/presentation/src/libraries/network/Server.cc

    r7745 r7750  
    101101
    102102
    103   /* TODO */
     103  /** helper that connects to the master server */
    104104  void Server::helper_ConnectToMasterserver()
    105105  {
     
    173173  {
    174174    /* handle incoming data */
     175    /* TODO this is to be implemented. */
    175176
    176177    /* done handling, return all ok code 0 */
     
    180181  void Server::helper_HandleMasterServerRequests()
    181182  {
     183    /* poll the master server for replies and see whether something
     184     * has to be done or changed.
     185     */
    182186    this->msc.pollForReply( rephandler );
    183187  }
  • code/branches/presentation/src/libraries/network/WANDiscovery.cc

    r7749 r7750  
    4747    COUT(4) << "Creating WANDiscovery.\n";
    4848 
    49     /* register object with orxonox main class */
     49    /* register object in orxonox */
    5050    RegisterObject(WANDiscovery);
    5151
    52     /* ... and register a config value function for it */
     52    /* check for the masterserver address option in orxonox.ini */
    5353    this->setConfigValues();
    5454
     
    6868  void WANDiscovery::setConfigValues()
    6969  {
     70    /* update msaddress string from orxonox.ini config file, if it
     71     * has changed.
     72     */
    7073    SetConfigValue( msaddress, "localhost");
    7174  }
  • code/branches/presentation/src/libraries/network/WANDiscovery.h

    r7745 r7750  
    5757      ~WANDiscovery();
    5858
    59       /** get content of msaddress */
     59      /** \return Address of the master server
     60       *
     61       * Get the master server address
     62       */
    6063      std::string getMSAddress()
    6164      { return this->msaddress; }
Note: See TracChangeset for help on using the changeset viewer.