eq::net::SocketConnection Class Reference

A socket connection (TCPIP or SDP). More...

#include <socketConnection.h>

Inheritance diagram for eq::net::SocketConnection:
Inheritance graph
[legend]
Collaboration diagram for eq::net::SocketConnection:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SocketConnection (const ConnectionType type=CONNECTIONTYPE_TCPIP)
 Create a new socket-based connection.
virtual bool connect ()
 Connect to the remote peer.
virtual bool listen ()
 Put the connection into the listening state.
virtual void acceptNB ()
 Start an accept operation.
virtual ConnectionPtr acceptSync ()
 Complete an accept operation.
virtual void close ()
 Close a connected or listening connection.

Detailed Description

A socket connection (TCPIP or SDP).

Definition at line 37 of file socketConnection.h.


Constructor & Destructor Documentation

eq::net::SocketConnection::SocketConnection ( const ConnectionType  type = CONNECTIONTYPE_TCPIP  ) 

Create a new socket-based connection.

Parameters:
type the connection type, can be CONNECTIONTYPE_TCPIP or CONNECTIONTYPE_SDP.

Definition at line 52 of file socketConnection.cpp.

References eq::net::CONNECTIONTYPE_SDP, eq::net::CONNECTIONTYPE_TCPIP, and EQVERB.

Referenced by acceptSync().

Here is the caller graph for this function:


Member Function Documentation

bool eq::net::SocketConnection::connect (  )  [virtual]

Connect to the remote peer.

The ConnectionDescription of this connection is used to identify the peer's parameters.

Returns:
true if the connection was successfully connected, false if not.

Reimplemented from eq::net::Connection.

Definition at line 78 of file socketConnection.cpp.

References eq::net::Connection::_description, eq::net::FDConnection::_readFD, eq::net::Connection::_state, close(), eq::net::CONNECTIONTYPE_SDP, eq::net::CONNECTIONTYPE_TCPIP, EQINFO, EQWARN, eq::net::Connection::STATE_CLOSED, eq::net::Connection::STATE_CONNECTED, eq::net::Connection::STATE_CONNECTING, and eq::base::sysError().

Here is the call graph for this function:

bool eq::net::SocketConnection::listen (  )  [virtual]

Put the connection into the listening state.

The ConnectionDescription of this connection is used to identify the listening parameters.

Returns:
true if the connection is listening for new incoming connections, false if not.

Reimplemented from eq::net::Connection.

Definition at line 533 of file socketConnection.cpp.

References eq::net::Connection::_description, eq::net::FDConnection::_readFD, eq::net::Connection::_state, close(), eq::net::CONNECTIONTYPE_SDP, eq::net::CONNECTIONTYPE_TCPIP, EQINFO, EQWARN, eq::net::Connection::STATE_CLOSED, eq::net::Connection::STATE_CONNECTING, eq::net::Connection::STATE_LISTENING, and eq::base::sysError().

Here is the call graph for this function:

void eq::net::SocketConnection::acceptNB (  )  [virtual]

Start an accept operation.

This method returns immediately. The Notifier will signal a new connection request, upon which acceptSync() should be used to finish the accept operation.

See also:
acceptSync()

Reimplemented from eq::net::Connection.

Definition at line 301 of file socketConnection.cpp.

ConnectionPtr eq::net::SocketConnection::acceptSync (  )  [virtual]

Complete an accept operation.

Returns:
the new connection, 0 on error.

Reimplemented from eq::net::Connection.

Definition at line 303 of file socketConnection.cpp.

References eq::net::Connection::_description, eq::net::FDConnection::_readFD, eq::net::Connection::_state, eq::net::FDConnection::_writeFD, EQVERB, EQWARN, SocketConnection(), eq::net::Connection::STATE_CONNECTED, eq::net::Connection::STATE_LISTENING, and eq::base::sysError().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Sat Feb 6 13:11:45 2010 for Equalizer 0.9.1 by  doxygen 1.6.1