CTCPListenSocket Class Reference

TCP listen socket. More...

#include <CTCPListenSocket.h>

Inherits IListenSocket.

Inheritance diagram for CTCPListenSocket:

Inheritance graph
[legend]
Collaboration diagram for CTCPListenSocket:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CTCPListenSocket ()
 ~CTCPListenSocket ()
virtual void bind (const CNetworkAddress &)
 Bind socket to address.
virtual void close ()
 Close socket.
virtual void * getEventTarget () const
 Get event target.
virtual IDataSocketaccept ()
 Accept connection.

Detailed Description

TCP listen socket.

A listen socket using TCP.

Definition at line 28 of file CTCPListenSocket.h.


Member Function Documentation

IDataSocket * CTCPListenSocket::accept (  )  [virtual]

Accept connection.

Accept a connection, returning a socket representing the full-duplex data stream. Returns NULL if no socket is waiting to be accepted. This is only valid after a call to bind().

Implements IListenSocket.

Definition at line 102 of file CTCPListenSocket.cpp.

References CSocketMultiplexer::addSocket(), and CSocketMultiplexer::getInstance().

void CTCPListenSocket::bind ( const CNetworkAddress  )  [virtual]

Bind socket to address.

Binds the socket to a particular address.

Implements IListenSocket.

Definition at line 58 of file CTCPListenSocket.cpp.

References CSocketMultiplexer::addSocket(), CNetworkAddress::getAddress(), CSocketMultiplexer::getInstance(), and XArch::what().

void CTCPListenSocket::close (  )  [virtual]

Close socket.

Closes the socket. This should flush the output stream.

Implements IListenSocket.

Definition at line 79 of file CTCPListenSocket.cpp.

References CSocketMultiplexer::getInstance(), CSocketMultiplexer::removeSocket(), and XArch::what().

void * CTCPListenSocket::getEventTarget (  )  const [virtual]

Get event target.

Returns the event target for events generated by this socket.

Implements IListenSocket.

Definition at line 96 of file CTCPListenSocket.cpp.


The documentation for this class was generated from the following files:
Generated on Fri Nov 6 00:19:13 2009 for synergy-plus by  doxygen 1.4.7