Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 23, 2010, 6:50:22 PM (14 years ago)
Author:
landauf
Message:

moved ScopedSingletonManager to util

Location:
code/branches/consolecommands3/src/libraries/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/network/Client.cc

    r7163 r7207  
    4545#include "util/Clock.h"
    4646#include "util/Debug.h"
     47#include "util/ScopedSingletonManager.h"
    4748#include "synchronisable/Synchronisable.h"
    4849#include "packet/Chat.h"
     
    5253#include "core/CommandLineParser.h"
    5354#include "core/Game.h"
    54 #include "core/ScopedSingletonManager.h"
    5555
    5656namespace orxonox
     
    107107    return ClientConnection::closeConnection();
    108108  }
    109  
     109
    110110  void Client::setDestination(const std::string& serverAddress, unsigned int port)
    111111  {
  • code/branches/consolecommands3/src/libraries/network/LANDiscovery.cc

    r7163 r7207  
    3232#include <cstring>
    3333
     34#include "util/ScopedSingletonManager.h"
    3435#include "core/CoreIncludes.h"
    35 #include "core/ScopedSingletonManager.h"
    3636
    3737
    3838namespace orxonox
    39 { 
     39{
    4040  ManageScopedSingleton(LANDiscovery, ScopeID::Root, true);
    41  
     41
    4242  LANDiscovery::LANDiscovery()
    4343  {
     
    4949    enet_host_destroy(this->host_);
    5050  }
    51  
     51
    5252  void LANDiscovery::discover()
    5353  {
     
    5656    enet_address_set_host(&address, "255.255.255.255");
    5757    address.port = LAN_DISCOVERY_PORT;
    58    
     58
    5959    ENetPeer* peer;
    6060    peer = enet_host_connect(this->host_, &address, 0);
    61    
     61
    6262    ENetEvent event;
    6363    while( enet_host_service(this->host_, &event, 1000 ) )
     
    9393    }
    9494  }
    95  
     95
    9696  std::string LANDiscovery::getServerListItemName(unsigned int index)
    9797  {
     
    101101      return this->servers_[index].getServerName();
    102102  }
    103  
     103
    104104  std::string LANDiscovery::getServerListItemIP(unsigned int index)
    105105  {
     
    109109      return this->servers_[index].getServerIP();
    110110  }
    111  
    112  
     111
     112
    113113} // namespace orxonox
Note: See TracChangeset for help on using the changeset viewer.