MPS::InetTransport class Reference (original) (raw)

Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members


Implements a TCP/IP-socket Transport class for accessing and serving MPS objects. More...

#include <[transport_inet.h](transport%5Finet%5Fh-source.html)>

Inheritance diagram for MPS::InetTransport:

Inheritance graph

[legend]

Collaboration diagram for MPS::InetTransport:

Collaboration graph

[legend]

List of all members.

Static Public Methods
void initialise (string const &hostName, int portNumber)
ref<FileDescriptorManager> const& getFdMgr ()
Protected Methods
virtual ref<Connection> connectTo (Address const &connectionSpec)
virtual string registerServer (Server *server, Address const &spec)
virtual string deregisterServer (Server *server, Address const &spec)
ref<FileDescriptor> socketFor (Address const &connectionSpec)
Private Types
typedef map< string, ref<InetDemux> > demuxMap_t
Private Methods
InetTransport (string const &hostName, int portNumber)
ref<InetDemux> registerServerSocket (ref< ServerSocketDescriptor > const &serverSock)
Private Attributes
ref<FileDescriptorManager> fdMgr
demuxMap_t clientMap
demuxMap_t serverMap
ref<InetDemux> defaultDemux
int nextOid
Static Private Attributes
InetTransport* instance

Detailed Description

Implements a TCP/IP-socket Transport class for accessing and serving MPS objects.

Manages all server and client sockets for this process. Dispatches incoming work to the appropriate objects.

Definition at line 49 of file transport_inet.h.


Member Typedef Documentation

typedef map< string, ref< InetDemux > > MPS::InetTransport::demuxMap_t< string, ref<InetDemux> > [private]


Constructor & Destructor Documentation

MPS::InetTransport::InetTransport ( string const & hostName,
int portNumber ) [private]

Member Function Documentation

virtual ref<Connection> MPS::InetTransport::connectTo ( Address const & connectionSpec ) [protected, virtual]

| | Returns a message source/sink that can be used for communication with the object at the address described by the connectionSpec.The connectionSpec is the broken-down resolved name of the remote object, and must match the address format that this transport expects. Parameters: connectionSpec the address of the remote object Returns: a connection handle for remote communication, or NULL if none could be created Reimplemented from MPS::Transport. | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

virtual string MPS::InetTransport::deregisterServer ( Server * server,
Address const & spec ) [protected, virtual]

| | Attempt to deregister a server interface. Parameters: server the server to deregister spec the connection specification that the transport may use as a hint in determining the final resolved name to use when unbinding this object. Returns: the canonical name of the server-that-was-bound-to-this-transport, or "" if unbinding from this transport fails. Reimplemented from MPS::Transport. | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

void MPS::InetTransport::initialise ( string const & hostName,
int portNumber ) [inline, static]

| | Creates the single per-application instance of InetTransport, and registers it using Transport::registerTransport(). Parameters: namingServerLocation resolved address of the naming server to use hostName either "" (for all) or the name of the local interface to bind to portNumber either 0 (for any) or the number of the TCP port to bind to Definition at line 93 of file transport_inet.h.Referenced by main(). | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

virtual string MPS::InetTransport::registerServer ( Server * server,
Address const & spec ) [protected, virtual]

| | Attempt to register a server interface for access using this transport. Parameters: server the server to register spec the connection specification that the transport may use as a hint in determining the final resolved name to use when binding this object. Returns: the canonical name of the server-bound-to-this-transport, or "" if binding to this transport fails. Reimplemented from MPS::Transport. | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |


Member Data Documentation

demuxMap_t MPS::InetTransport::clientMap [private]

| | Find a client demux for a given ipaddr:port.Definition at line 66 of file transport_inet.h. | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

| | All FileDescriptors we are responsible for.Definition at line 64 of file transport_inet.h. | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

InetTransport* MPS::InetTransport::instance [static, private]

int MPS::InetTransport::nextOid [private]

demuxMap_t MPS::InetTransport::serverMap [private]

| | Find a server demux for a given ipaddr:port.Definition at line 67 of file transport_inet.h. | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |


The documentation for this class was generated from the following file:


Generated at Wed Aug 15 01:05:29 2001 for mps-cpp by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001