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

VOS::RemoteSocketSite Class Reference

This class manages a connection to a remote site and the objects bound to that site. More...

#include <vos/corelibs/vos/remotesocketsite.hh>

Inheritance diagram for VOS::RemoteSocketSite:

VOS::RemoteSite VOS::Site VOS::RemoteMetaObject VOS::ChildChangeListener VOS::ParentChangeListener VOS::TypeChangeListener VOS::MetaObject VOS::MetaObject VOS::RemoteVobject VOS::Vobject VOS::Vobject VOS::VobjectImplementation VOS::RefCounted VOS::RefCounted VOS::Vobject VOS::ObjectExciseListener VOS::RefCounted List of all members.

Public Member Functions

Protected Member Functions

Protected Attributes

Friends


Detailed Description

This class manages a connection to a remote site and the objects bound to that site.

Definition at line 102 of file remotesocketsite.hh.


Constructor & Destructor Documentation

RemoteSocketSite::RemoteSocketSite const string &  hostname,
unsigned short int  port
throw (SiteConnectionError) [protected]
 

Definition at line 167 of file remotesocketsite.cc.

RemoteSocketSite::RemoteSocketSite const string &  hostname  )  throw (SiteConnectionError) [protected]
 

Definition at line 179 of file remotesocketsite.cc.

VOS::RemoteSocketSite::RemoteSocketSite int  fd,
struct sockaddr_in *  peeraddr
[protected]
 

RemoteSocketSite::~RemoteSocketSite  )  [virtual]
 

Definition at line 233 of file remotesocketsite.cc.


Member Function Documentation

void RemoteSocketSite::enableOutgoing bool  sendqueue,
const string &  rewriteTo = "?"
[virtual]
 

Reenable message sending after a call to suppressOutgoing().

Parameters:
sendqueue true to send the queued messages, false to discard the queue

Definition at line 579 of file remotesocketsite.cc.

Referenced by secureConnection().

void RemoteSocketSite::excise  )  [virtual]
 

Note:
Important: this is delegated to the top object, and means you want the entire logical Vobject to go away! If called on an object with no superobject, it calls doExcise() on its type handlers. Type implementation specific cleanup code (such as calling excise on certain children no longer needed) should override doExcise().

Reimplemented from VOS::RemoteSite.

Definition at line 246 of file remotesocketsite.cc.

Referenced by handleDisconnection().

void RemoteSocketSite::flushIncomingBuffers  )  [virtual]
 

Flush any incoming buffers (eg read any data waiting in sockets).

Implements VOS::RemoteSite.

Definition at line 263 of file remotesocketsite.cc.

Referenced by VOS::LocalSocketSite::flushIncomingBuffers().

void RemoteSocketSite::flushOutgoingBuffers const char *  data = 0,
unsigned int  sz = 0
[virtual]
 

Implements VOS::RemoteSite.

Definition at line 330 of file remotesocketsite.cc.

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

X509 * RemoteSocketSite::getCertificate  ) 
 

Get the remote site's X509 certificate.

You need to use the OpenSSL X509 API to access its fields.

Definition at line 519 of file remotesocketsite.cc.

virtual int VOS::RemoteSocketSite::getReadingFD  )  const [inline, virtual]
 

Returns:
the socket file descriptor over which we may read from this site

Definition at line 132 of file remotesocketsite.hh.

Referenced by VOS::LocalSocketSite::flushIncomingBuffers().

virtual int VOS::RemoteSocketSite::getWritingFD  )  const [inline, virtual]
 

Returns:
the socket file descriptor over which we may send to this site

Definition at line 135 of file remotesocketsite.hh.

Referenced by VOS::LocalSocketSite::flushIncomingBuffers().

void RemoteSocketSite::handleDisconnection  )  [virtual]
 

Definition at line 238 of file remotesocketsite.cc.

Referenced by VOS::AsyncConnect::connect(), and flushIncomingBuffers().

void RemoteSocketSite::init const string &  hostname,
unsigned short int  port
throw (SiteConnectionError) [protected]
 

Definition at line 77 of file remotesocketsite.cc.

bool RemoteSocketSite::isConnected  )  [virtual]
 

Implements VOS::RemoteSite.

Definition at line 529 of file remotesocketsite.cc.

Referenced by VOS::AsyncConnect::connect().

int RemoteSocketSite::readStream char *  data,
unsigned int  datasize
[protected, virtual]
 

Definition at line 379 of file remotesocketsite.cc.

Referenced by flushIncomingBuffers().

void RemoteSocketSite::secureConnection const string &  protocol  ) 
 

Attempt to secure the connection using some transport-layer encryption.

Parameters:
protocol the protocol to use. Currently valid protocols are "SSLv3" and "TLSv1". The latter protocol, "TLSv1" is a more recent standard based on SSL and should be preferred.
Exceptions:
LocalSocketSite::SSLError on an error from OpenSSL
RemoteError if something went wrong or SSL support was not compiled in

Definition at line 437 of file remotesocketsite.cc.

void RemoteSocketSite::sendMessage MessageBlock m  )  [virtual]
 

Sends a block of messages to the object.

This may trigger immediate processing of the message if the object is local.

Parameters:
m A pointer to the message which is being sent. Its reference count will be increased as necssary.

Implements VOS::RemoteSite.

Definition at line 625 of file remotesocketsite.cc.

void RemoteSocketSite::sendMessage Message m  )  [virtual]
 

Sends a message to the object.

This may trigger immediate processing of the message if the object is local.

Parameters:
m A pointer to the message which is being sent. Its reference count will be increased as necssary.

Implements VOS::RemoteSite.

Definition at line 604 of file remotesocketsite.cc.

Referenced by enableOutgoing(), and secureConnection().

void RemoteSocketSite::suppressOutgoing bool  enqueue  )  [virtual]
 

Prevent messages from being sent along the underlying transport layer.

Parameters:
enqueue true to save the messages in a queue, false to drop them

Definition at line 570 of file remotesocketsite.cc.

Referenced by secureConnection().

void RemoteSocketSite::switchProtocol SSL_CTX *  context  ) 
 

Immediately try to switch to using a secure protocol.

Don't use this! (the other side needs to be told you want to switch) Use secureConnection() instead.

Definition at line 492 of file remotesocketsite.cc.

int RemoteSocketSite::writeStream const char *  data,
unsigned int  datasize
[protected, virtual]
 

Definition at line 408 of file remotesocketsite.cc.

Referenced by flushOutgoingBuffers().


Friends And Related Function Documentation

friend class AsyncConnect [friend]
 

Definition at line 183 of file remotesocketsite.hh.

friend class LocalSite [friend]
 

Definition at line 182 of file remotesocketsite.hh.

void LocalSocketSite::acceptConnectionRequests  )  [friend]
 


Member Data Documentation

EnqueueOutgoing VOS::RemoteSocketSite::enqueueOutgoing [protected]
 

Definition at line 123 of file remotesocketsite.hh.

Referenced by enableOutgoing(), and suppressOutgoing().

OutgoingLock VOS::RemoteSocketSite::outgoinglock [protected]
 

Definition at line 122 of file remotesocketsite.hh.

Referenced by enableOutgoing(), and suppressOutgoing().

string VOS::RemoteSocketSite::outputBuffer [protected]
 

Definition at line 126 of file remotesocketsite.hh.

Referenced by flushOutgoingBuffers().

MessageBlock* VOS::RemoteSocketSite::partialMessage [protected]
 

Definition at line 110 of file remotesocketsite.hh.

Referenced by flushIncomingBuffers().

int VOS::RemoteSocketSite::readingFD [protected]
 

Definition at line 106 of file remotesocketsite.hh.

Referenced by excise(), flushIncomingBuffers(), isConnected(), readStream(), secureConnection(), and switchProtocol().

unsigned short int VOS::RemoteSocketSite::remoteport [protected]
 

Definition at line 105 of file remotesocketsite.hh.

int VOS::RemoteSocketSite::sockSendBufSz [protected]
 

Definition at line 125 of file remotesocketsite.hh.

Referenced by flushOutgoingBuffers().

SSL* VOS::RemoteSocketSite::ssl [protected]
 

Definition at line 109 of file remotesocketsite.hh.

Referenced by getCertificate(), readStream(), secureConnection(), switchProtocol(), and writeStream().

bool VOS::RemoteSocketSite::usingSOCKS [protected]
 

Definition at line 108 of file remotesocketsite.hh.

Referenced by readStream(), and writeStream().

int VOS::RemoteSocketSite::writingFD [protected]
 

Definition at line 107 of file remotesocketsite.hh.

Referenced by excise(), flushOutgoingBuffers(), secureConnection(), sendMessage(), switchProtocol(), and writeStream().


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