Sirikata
|
#include <ServerIDMap.hpp>
Public Types | |
typedef std::tr1::function < void(ServerID, Address4)> | Address4LookupCallback |
Public Member Functions | |
ServerIDMap (Context *ctx) | |
virtual | ~ServerIDMap () |
virtual void | lookupInternal (const ServerID &sid, Address4LookupCallback cb)=0 |
Lookup for internal addresses, i.e. | |
virtual void | lookupExternal (const ServerID &sid, Address4LookupCallback cb)=0 |
Lookup for external addresses, i.e. | |
virtual void | lookupRandomExternal (Address4LookupCallback cb)=0 |
Lookup a random external addres, e.g. | |
Protected Attributes | |
Context * | mContext |
typedef std::tr1::function<void(ServerID, Address4)> Sirikata::ServerIDMap::Address4LookupCallback |
Sirikata::ServerIDMap::ServerIDMap | ( | Context * | ctx | ) | [inline] |
virtual Sirikata::ServerIDMap::~ServerIDMap | ( | ) | [inline, virtual] |
virtual void Sirikata::ServerIDMap::lookupExternal | ( | const ServerID & | sid, |
Address4LookupCallback | cb | ||
) | [pure virtual] |
Lookup for external addresses, i.e.
those used for object host to space server communication. Returns NullServerID or Address4::Null if the server can't be found.
Implemented in Sirikata::HttpServerIDMap, Sirikata::LocalServerIDMap, and Sirikata::TabularServerIDMap.
Referenced by Sirikata::CoordinateSegmentationClient::CoordinateSegmentationClient(), and Sirikata::SessionManager::setupSpaceConnection().
virtual void Sirikata::ServerIDMap::lookupInternal | ( | const ServerID & | sid, |
Address4LookupCallback | cb | ||
) | [pure virtual] |
Lookup for internal addresses, i.e.
those used for space server to space server communication. Returns NullServerID or Address4::Null if the server can't be found.
Implemented in Sirikata::HttpServerIDMap, Sirikata::LocalServerIDMap, and Sirikata::TabularServerIDMap.
Referenced by Sirikata::DistributedCoordinateSegmentation::createSocketContainers(), Sirikata::DistributedCoordinateSegmentation::DistributedCoordinateSegmentation(), Sirikata::TCPSpaceNetwork::listen(), and Sirikata::TCPSpaceNetwork::openConnection().
virtual void Sirikata::ServerIDMap::lookupRandomExternal | ( | Address4LookupCallback | cb | ) | [pure virtual] |
Lookup a random external addres, e.g.
to find any node to bootstrap a connection to the space.
Implemented in Sirikata::HttpServerIDMap, Sirikata::LocalServerIDMap, and Sirikata::TabularServerIDMap.
Referenced by Sirikata::SessionManager::getAnySpaceConnection().
Context* Sirikata::ServerIDMap::mContext [protected] |
Referenced by Sirikata::HttpServerIDMap::finishLookup(), Sirikata::TabularServerIDMap::lookupExternal(), Sirikata::LocalServerIDMap::lookupExternal(), Sirikata::TabularServerIDMap::lookupInternal(), Sirikata::LocalServerIDMap::lookupInternal(), Sirikata::TabularServerIDMap::lookupRandomExternal(), Sirikata::LocalServerIDMap::lookupRandomExternal(), and Sirikata::HttpServerIDMap::retryOrFail().