SocketDescriptor class Reference (original) (raw)

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


Subclasses FileDescriptor to provide a general-purpose wrapper for BSD TCP or UDP server- or client-sockets. More...

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

Inheritance diagram for SocketDescriptor:

Inheritance graph

[legend]

Collaboration diagram for SocketDescriptor:

Collaboration graph

[legend]

List of all members.

Public Methods
virtual void close ()
AddressAccessors
Accessors for local and remote address information for this socket.
string const& getLocalHostname () const
int getLocalPort () const
string const& getRemoteHostname () const
int getRemotePort () const
Protected Methods
virtual int lowlevel_read (int fd, char *buf, int len)
virtual int lowlevel_write (int fd, char const *buf, int len)
SocketDescriptor (ref< FileDescriptorManager > const &_fdMgr, int _fd)
void setLocalAddr (string const &hostname, int port)
void setRemoteAddr (string const &hostname, int port)
Private Attributes
string hostname_local
int port_local
string hostname_remote
int port_remote
Friends
class ServerSocketDescriptor

Detailed Description

Subclasses FileDescriptor to provide a general-purpose wrapper for BSD TCP or UDP server- or client-sockets.

Definition at line 19 of file SocketDescriptor.h.


Constructor & Destructor Documentation

SocketDescriptor::SocketDescriptor ( ref< FileDescriptorManager > const & _fdMgr,
int _fd ) [inline, protected]

Member Function Documentation

void SocketDescriptor::close ( ) [virtual]
string const & SocketDescriptor::getLocalHostname ( ) const [inline]
int SocketDescriptor::getLocalPort ( ) const [inline]
string const & SocketDescriptor::getRemoteHostname ( ) const [inline]
int SocketDescriptor::getRemotePort ( ) const [inline]
int SocketDescriptor::lowlevel_read ( int fd,
char * buf,
int len ) [protected, virtual]

| | Override to use recv and send if on linux or win32.Reimplemented from FileDescriptor. | | -------------------------------------------------------------------------------------------------------------------------- |

virtual int SocketDescriptor::lowlevel_write ( int fd,
char const * buf,
int len ) [protected, virtual]
void SocketDescriptor::setLocalAddr ( string const & hostname,
int port ) [inline, protected]
void SocketDescriptor::setRemoteAddr ( string const & hostname,
int port ) [inline, protected]

friend class ServerSocketDescriptor [friend]


Member Data Documentation

string SocketDescriptor::hostname_local [private]

| | Name of the IP-address of the local end of the socket.Definition at line 21 of file SocketDescriptor.h. | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

string SocketDescriptor::hostname_remote [private]

| | Name of the IP-address of the remote end of the socket.Definition at line 24 of file SocketDescriptor.h. | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

int SocketDescriptor::port_local [private]

int SocketDescriptor::port_remote [private]


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


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