VOS::LocalSocketSiteExtension Class Reference
[libvos]
#include <vos/vos/localsocketsite.hh>
Inheritance diagram for VOS::LocalSocketSiteExtension:

Detailed Description
This class sets up the actual socket that the VOS site will listen on and manages a list of the remote sites we are connected to.
Definition at line 56 of file localsocketsite.hh.
Public Member Functions
- LocalSocketSiteExtension ()
- LocalSocketSiteExtension (const std::string &defaultHostname, unsigned short int port)
- LocalSocketSiteExtension (const std::string &defaultHostname)
- LocalSocketSiteExtension (unsigned short int port)
- virtual ~LocalSocketSiteExtension ()
- int getListenSocket ()
- virtual void addRemoteSite (RemoteSiteExtension *rs)
- virtual void removeRemoteSite (RemoteSiteExtension *rs)
- RSSEIterator getRemoteSites ()
- virtual void siteExtensionAttachedTo (Site *st)
- Called by the Site object indicating that this extension has been attached to that site.
- Called by the Site object indicating that this extension has been attached to that site.
Static Public Attributes
Constructor & Destructor Documentation
| VOS::LocalSocketSiteExtension::LocalSocketSiteExtension | ( | ) |
Default constructor.
This will attempt to autodetect your hostname. It will listen on the first available port it finds, starting from 4231 and working its way upward. This will use the VOS_HOSTNAME environment variable (in the form hostname:port) to define the hostname and port.
| VOS::LocalSocketSiteExtension::LocalSocketSiteExtension | ( | const std::string & | defaultHostname, | |
| unsigned short int | port | |||
| ) |
Use the supplied hostname and port.
- Parameters:
-
defaultHostname the canonical hostname for this site port the TCP port for the site to listen on
- Exceptions:
-
PortBindingError if the port is not available.
| VOS::LocalSocketSiteExtension::LocalSocketSiteExtension | ( | const std::string & | defaultHostname | ) |
Use the supplied hostname.
Will use the first available port, starting from 4231 and working upward.
- Parameters:
-
defaultHostname the canonical hostname for this site
| VOS::LocalSocketSiteExtension::LocalSocketSiteExtension | ( | unsigned short int | port | ) |
Use the supplied port.
Will autodetect hostname, or take the canonical hostname from VOS_HOSTNAME (ignoring the port!)
- Parameters:
-
port the TCP port to listen on
- Exceptions:
-
PortBindingError if the port is not available.
| virtual VOS::LocalSocketSiteExtension::~LocalSocketSiteExtension | ( | ) | [virtual] |
Destructor.
Member Function Documentation
| virtual void VOS::LocalSocketSiteExtension::addRemoteSite | ( | RemoteSiteExtension * | rs | ) | [virtual] |
Add a remote site that we're peered with.
- Parameters:
-
rs the RemoteSocketSiteExtension object representing the connection to the remote site
Implements VOS::LocalSiteExtension.
| int VOS::LocalSocketSiteExtension::getListenSocket | ( | ) | [inline] |
- Returns:
- the socket file descriptor used to accept incoming connections
Definition at line 110 of file localsocketsite.hh.
| RSSEIterator VOS::LocalSocketSiteExtension::getRemoteSites | ( | ) |
- Returns:
- the remote sites we are peered with
| virtual void VOS::LocalSocketSiteExtension::removeRemoteSite | ( | RemoteSiteExtension * | rs | ) | [virtual] |
Remove a remote site that we're peered with.
- Parameters:
-
rs the RemoteSocketSiteExtension object representing the connection to the remote site
Implements VOS::LocalSiteExtension.
| virtual void VOS::LocalSocketSiteExtension::siteExtensionAttachedTo | ( | Site * | st | ) | [virtual] |
Called by the Site object indicating that this extension has been attached to that site.
Reimplemented from VOS::LocalSiteExtension.
Member Data Documentation
When creating an outgoing connection, the remote site will be peered with this local site.
Definition at line 73 of file localsocketsite.hh.
The documentation for this class was generated from the following file:
- /home/tetron/hack/vos/libs/vos/vos/localsocketsite.hh