A socket connection (TCPIP or SDP). More...
#include <socketConnection.h>


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. | |
A socket connection (TCPIP or SDP).
Definition at line 37 of file socketConnection.h.
| eq::net::SocketConnection::SocketConnection | ( | const ConnectionType | type = CONNECTIONTYPE_TCPIP |
) |
Create a new socket-based connection.
| 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().

| bool eq::net::SocketConnection::connect | ( | ) | [virtual] |
Connect to the remote peer.
The ConnectionDescription of this connection is used to identify the peer's parameters.
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().

| 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.
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().

| 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.
Reimplemented from eq::net::Connection.
Definition at line 301 of file socketConnection.cpp.
| ConnectionPtr eq::net::SocketConnection::acceptSync | ( | ) | [virtual] |
Complete an accept operation.
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().

0.9.1 by
1.6.1