Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

LocalSite Class Reference

A site which is local to your application. More...

#include <localsite.hh>

Inheritance diagram for LocalSite:

Site LocalMetaObject MetaObject LocalVobject List of all members.

Public Member Functions

Static Public Member Functions

Protected Types

Protected Member Functions

Protected Attributes

Friends


Detailed Description

A site which is local to your application.

It is to one of these where you will attach all of your own local objects. It listens on a single TCP socket for incoming connections from remote sites (this connection process is called site peering).

Definition at line 41 of file localsite.hh.


Member Typedef Documentation

typedef void(* LocalSite::callback_t)(void* userdata) [protected]
 

Definition at line 88 of file localsite.hh.


Constructor & Destructor Documentation

LocalSite::LocalSite  )  [protected]
 

constructor

Definition at line 44 of file localsite.cc.

LocalSite::~LocalSite  )  [virtual]
 

destructor

Definition at line 52 of file localsite.cc.


Member Function Documentation

void LocalSite::addCallback callback_t  callback,
void *  userdata,
double  timeout,
bool  repeat
 

Definition at line 165 of file localsite.cc.

void LocalSite::addLocalObjectExtension const char *  type,
metaobject_extender_t  newmethod
[static]
 

Definition at line 917 of file localsite.cc.

Referenced by Text::registerExtenders(), Sound::registerExtenders(), Property::registerExtenders(), GPSPosition::registerExtenders(), FileProperty::registerExtenders(), ExtrapolatedProperty::registerExtenders(), DBProperty::registerExtenders(), BufferedLocalProperty::registerExtenders(), HostedAvatar::registerExtenders(), Talkative::registerExtenders(), Services::registerExtenders(), Search::registerExtenders(), Metadata::registerExtenders(), Hypercard::registerExtenders(), Gateway::registerExtenders(), FestTalk::registerExtenders(), Avatar3D::registerExtenders(), Avatar::registerExtenders(), Image2D::registerExtenders(), Hello::registerExtenders(), VOSGUI::Widget::registerExtenders(), VOSGUI::SelectValue::registerExtenders(), VOSGUI::SelectList::registerExtenders(), VOSGUI::SelectBoolean::registerExtenders(), VOSGUI::Select::registerExtenders(), VOSGUI::Menubar::registerExtenders(), VOSGUI::MenuBar::registerExtenders(), VOSGUI::Menu::registerExtenders(), VOSGUI::Label::registerExtenders(), VOSGUI::SliderNumericInput::registerExtenders(), VOSGUI::NumericInput::registerExtenders(), VOSGUI::FileInput::registerExtenders(), VOSGUI::ColorInput::registerExtenders(), VOSGUI::Input::registerExtenders(), VOSGUI::Display::registerExtenders(), VOSGUI::Container::registerExtenders(), VOSGUI::Button::registerExtenders(), VOSChatGUI::PrivMsg::registerExtenders(), VOSChatGUI::AvatarList::registerExtenders(), A3DL::Viewpoint::registerExtenders(), A3DL::Texture::registerExtenders(), A3DL::Sphere::registerExtenders(), A3DL::Snow::registerExtenders(), A3DL::Sector::registerExtenders(), A3DL::Portal::registerExtenders(), A3DL::PolygonMesh::registerExtenders(), A3DL::Model::registerExtenders(), A3DL::Material::registerExtenders(), A3DL::Light::registerExtenders(), A3DL::Cylinder::registerExtenders(), A3DL::Cube::registerExtenders(), A3DL::Cone::registerExtenders(), and A3DL::Billboard::registerExtenders().

void LocalSite::addNotification NotifyEvent *  ev  )  [virtual]
 

Definition at line 940 of file localsite.cc.

void LocalSite::addPrioritizedNonce const string &  nonce,
RemoteSite *  source
[virtual]
 

Definition at line 827 of file localsite.cc.

bool LocalSite::checkScheduleHoldsSite Site site  )  [virtual]
 

Definition at line 457 of file localsite.cc.

Referenced by runSchedule().

MetaObject * LocalSite::createMetaObject const char *  name,
VobjectAccessControl *  ac,
const deque< string > &  typelist
[virtual]
 

Create a new local metaobject, with the supplied access control (ar defoult site AC if 0).

See also:
createMetaObject(const char*, const char*, ...)

Definition at line 859 of file localsite.cc.

MetaObject * LocalSite::createMetaObject const char *  name,
VobjectAccessControl *  ac,
const char *  type0,
... 
[virtual]
 

Create a new local metaobject, with the supplied access control (ar defoult site AC if 0).

See also:
createMetaObject(const char*, const char*, ...)

Definition at line 875 of file localsite.cc.

MetaObject * LocalSite::createMetaObject const char *  name,
const deque< string > &  typelist
[virtual]
 

Definition at line 871 of file localsite.cc.

MetaObject * LocalSite::createMetaObject const char *  name,
const char *  type0,
... 
[virtual]
 

Definition at line 896 of file localsite.cc.

Referenced by createMetaObject(), COD::readCOD(), and sendMessage().

void LocalSite::doCallbacks  ) 
 

Definition at line 239 of file localsite.cc.

Referenced by runSchedule().

void LocalSite::extendMetaObject LocalMetaObject root,
const char *  type
[static]
 

Definition at line 846 of file localsite.cc.

Referenced by LocalMetaObject::addType(), and createMetaObject().

virtual void LocalSite::flushIncomingBuffers  )  [pure virtual]
 

void LocalSite::flushNotifications  )  [virtual]
 

Definition at line 956 of file localsite.cc.

Referenced by runSchedule(), and unlockNotificationFlush().

const string& LocalSite::getAntiSpoofIDMapping const string &  recv  )  [inline]
 

Maps a received anti-spoof ID to the one sent to that site.

Definition at line 221 of file localsite.hh.

Referenced by sendMessage().

virtual Site& LocalSite::getSite  )  [inline, virtual]
 

Reimplemented from LocalMetaObject.

Definition at line 160 of file localsite.hh.

double LocalSite::getTimeoutOnSelect  ) 
 

Get the select wait time.

Returns:
the maximum time (in seconds) that select will wait, or -1 if select will block indefinately.

Definition at line 821 of file localsite.cc.

bool LocalSite::hasLocalObjectExtension const char *  type  )  [static]
 

Definition at line 875 of file localsite.cc.

Referenced by LocalMetaObject::addType().

void LocalSite::insertChild int  position,
const string &  contextual_name,
Vobject *  child
throw (AccessControlError, RemoteError) [virtual]
 

Reimplemented from LocalMetaObject.

Definition at line 976 of file localsite.cc.

virtual bool LocalSite::isConnected  )  [inline, virtual]
 

Definition at line 156 of file localsite.hh.

void LocalSite::lockNotificationFlush  )  [virtual]
 

Definition at line 945 of file localsite.cc.

void LocalSite::printExtensionTable ostream &  stream = std::cerr  )  [static]
 

Definition at line 934 of file localsite.cc.

void LocalSite::removeCallback callback_t  callback  ) 
 

Definition at line 209 of file localsite.cc.

Referenced by doCallbacks().

void LocalSite::removeChild int  position  )  throw (AccessControlError, RemoteError) [virtual]
 

Reimplemented from LocalMetaObject.

Definition at line 988 of file localsite.cc.

void LocalSite::removeLocalObjectExtension const char *  type,
metaobject_extender_t  oldmethod
[static]
 

Definition at line 923 of file localsite.cc.

void LocalSite::removePrioritizedNonce const string &  nonce,
RemoteSite *  source
[virtual]
 

Definition at line 835 of file localsite.cc.

void LocalSite::removeRemotePeer RemoteSite *  rs  )  [virtual]
 

Remove the peering relationship with a remote site.

Definition at line 439 of file localsite.cc.

void LocalSite::runSchedule  )  [virtual]
 

Execute the current schedule.

Definition at line 300 of file localsite.cc.

void LocalSite::scheduleMessageBlock MessageBlock *  mb,
MessageContext *  mc,
Site ss,
double  plustime = 0.0,
const char *  extradependency = 0
[virtual]
 

Schedule a message block for delivery.

Special message types like include will be processed.

Parameters:
mb The message block
mc The enclosing message context
ss The source site
plustime This value will be added to the delivery time
extradependency This dependency string will added to each message

Definition at line 56 of file localsite.cc.

void LocalSite::sendMessage MessageBlock *  m  )  [virtual]
 

Reimplemented from LocalMetaObject.

Definition at line 475 of file localsite.cc.

void LocalSite::sendMessage Message *  m  )  [virtual]
 

Reimplemented from LocalMetaObject.

Definition at line 492 of file localsite.cc.

Referenced by runSchedule(), and VOS::LocalSocketSite::sendMessage().

void LocalSite::setAntiSpoofIDMapping const string &  recv,
const string &  sent
[inline]
 

Maps a received anti-spoof ID to the one sent to that site.

Definition at line 218 of file localsite.hh.

Referenced by sendMessage().

void LocalSite::setChild int  position,
const string &  contextual_name,
Vobject *  child
throw (AccessControlError, RemoteError) [virtual]
 

Reimplemented from LocalMetaObject.

Definition at line 982 of file localsite.cc.

void LocalSite::setPrimaryHostname string  s  )  [virtual]
 

Definition at line 1018 of file localsite.cc.

void LocalSite::setTimeoutOnSelect double  sec  ) 
 

When select() is called to test file descriptors, this sets maximum amount of time to wait before returning if there is no data available.

This primarily applies to LocalSite::flushIncomingBuffers().

Parameters:
sec the time to wait, in seconds. This may be zero, in which case it will return immediately. If the time is negative, select will sleep indefinitely until data is received on any of the sockets or the process catches a signal.

Definition at line 810 of file localsite.cc.

void LocalSite::setURL const URL &  u  )  [virtual]
 

Definition at line 805 of file localsite.cc.

void LocalSite::takeOverMessages Site was,
Site now
 

Definition at line 994 of file localsite.cc.

void LocalSite::unlockNotificationFlush  )  [virtual]
 

Definition at line 950 of file localsite.cc.

void LocalSite::verifyCheckIDPair RemoteSocketSite *  rss,
const string &  spoofID
[protected]
 

Definition at line 481 of file localsite.cc.

Referenced by sendMessage().


Friends And Related Function Documentation

void Site::doSitePeering LocalSite localsite,
RemoteSite *  remotesite,
bool  isspooftest,
bool  waitforhello
[friend]
 


Member Data Documentation

map<string, string> LocalSite::antiSpoofMap [protected]
 

Definition at line 104 of file localsite.hh.

queue<pair<double, Callback> > LocalSite::callbackaddqueue [protected]
 

Definition at line 98 of file localsite.hh.

Referenced by doCallbacks().

bool LocalSite::callbacklock [protected]
 

Definition at line 96 of file localsite.hh.

Referenced by doCallbacks(), and removeCallback().

queue<callback_t> LocalSite::callbackremovequeue [protected]
 

Definition at line 99 of file localsite.hh.

Referenced by doCallbacks(), and removeCallback().

map<double, Callback> LocalSite::callbacks [protected]
 

Definition at line 97 of file localsite.hh.

Referenced by addCallback(), doCallbacks(), and removeCallback().

int LocalSite::iteratorsUsingPeerSites [protected]
 

Definition at line 56 of file localsite.hh.

Referenced by removeRemotePeer().

list<Message*> LocalSite::msgsReady [protected]
 

Definition at line 82 of file localsite.hh.

Referenced by runSchedule().

list< pair<string, RemoteSite*> > LocalSite::needSpoofIDreply [protected]
 

Definition at line 118 of file localsite.hh.

Referenced by sendMessage().

queue<NotifyEvent*> LocalSite::notifyEvents [protected]
 

Definition at line 101 of file localsite.hh.

Referenced by addNotification(), and flushNotifications().

bool LocalSite::notifyflushlock [protected]
 

Definition at line 102 of file localsite.hh.

Referenced by flushNotifications(), lockNotificationFlush(), and unlockNotificationFlush().

map<RemoteSite*, struct SiteTableEntry*> LocalSite::peerSites [protected]
 

List of remote sites we are peers with.

Definition at line 78 of file localsite.hh.

Referenced by removeRemotePeer(), and sendMessage().

boost::mutex LocalSite::peerSitesBuffer_mutex [protected]
 

Definition at line 75 of file localsite.hh.

Referenced by removeRemotePeer().

deque<RemoteSite*> LocalSite::peerSitesBuffer_remove [protected]
 

Definition at line 73 of file localsite.hh.

Referenced by removeRemotePeer().

deque<RemoteSite*> LocalSite::peerSitesBuffer_rs [protected]
 

The following three data structures are used to buffer changes to peerSites when we have an active iterator using peerSites.

This is to avoid invalidating the iterator (ye gods that was an obnoxious bug to track down.) The alternative would have to be to make a complete copy of the peerSites deque every time we want to copy it (ewww...)

Note:
although peerSitesBuffer_rs and peerSitesBuffer_st could be combined into a single structure like deque< pair<RemoteSite*, struct SiteTableEntry*> > BUT that causes an internal compiler error when compiling site.cc! So instead we do it this way. Bleh.

Definition at line 71 of file localsite.hh.

deque<struct SiteTableEntry*> LocalSite::peerSitesBuffer_st [protected]
 

Definition at line 72 of file localsite.hh.

set<string> LocalSite::pendingValidationHosts [protected]
 

Definition at line 116 of file localsite.hh.

Referenced by runSchedule(), and sendMessage().

map<RemoteSocketSite*, ValidationEntry> LocalSite::pendingValidations [protected]
 

Definition at line 115 of file localsite.hh.

Referenced by sendMessage().

map<string, RemoteSite*> LocalSite::prioritized [protected]
 

Definition at line 86 of file localsite.hh.

Referenced by addPrioritizedNonce(), removePrioritizedNonce(), and runSchedule().

struct ::timeval* LocalSite::selectwait [protected]
 

Definition at line 84 of file localsite.hh.

Referenced by getTimeoutOnSelect(), and setTimeoutOnSelect().

map<double, list<Message*> > LocalSite::siteMessageQueue [protected]
 

The current message schedule.

Definition at line 81 of file localsite.hh.

Referenced by checkScheduleHoldsSite(), runSchedule(), scheduleMessageBlock(), and takeOverMessages().


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:55:55 2003 for Interreality Project - VOS by doxygen 1.3.2