A rsp connection (Attn: only multicast usage implemented). More...
#include <rspConnection.h>


Classes | |
| struct | DatagramAck |
| struct | DatagramAckRequest |
| struct | DatagramCount |
| struct | DatagramData |
| struct | DatagramNack |
| struct | DatagramNode |
| struct | RepeatRequest |
| class | Thread |
Public Member Functions | |
| RSPConnection () | |
| Create a new rsp-based connection. | |
| virtual bool | listen () |
| Put the connection into the listening state. | |
| void | close () |
| Close a connected or listening connection. | |
| bool | connect () |
| Connect to the remote peer. | |
| virtual void | acceptNB () |
| Start an accept operation. | |
| virtual ConnectionPtr | acceptSync () |
| Complete an accept operation. | |
| void | readNB (void *buffer, const uint64_t bytes) |
| Start a read operation on the connection. | |
| int64_t | readSync (void *buffer, const uint64_t bytes) |
| Finish reading data from the connection. | |
| int64_t | write (const void *buffer, const uint64_t bytes) |
| Write data to the connection. | |
| int64_t | getSendRate () const |
| uint32_t | getID () const |
| virtual Notifier | getNotifier () const |
A rsp connection (Attn: only multicast usage implemented).
Definition at line 42 of file rspConnection.h.
| eq::net::RSPConnection::RSPConnection | ( | ) |
Create a new rsp-based connection.
Definition at line 68 of file rspConnection.cpp.
References eq::net::Connection::_description, eq::net::CONNECTIONTYPE_RSP, EQ_MIN, EQLOG, eq::net::Global::getIAttribute(), eq::net::Global::IATTR_RSP_NUM_BUFFERS, eq::net::Global::IATTR_UDP_MTU, eq::net::Global::IATTR_UDP_PACKET_RATE, and eq::base::Buffer< T >::reserve().

| bool eq::net::RSPConnection::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 179 of file rspConnection.cpp.
References eq::net::Connection::_description, eq::net::Connection::_state, eq::base::MTQueue< T >::clear(), close(), eq::net::CONNECTIONTYPE_RSP, eq::net::CONNECTIONTYPE_UDP, EQINFO, EQWARN, eq::base::RefPtr< T >::get(), eq::base::MTQueue< T >::push(), eq::net::Connection::STATE_CLOSED, and eq::net::Connection::STATE_CONNECTING.
Referenced by connect().


| bool eq::net::RSPConnection::connect | ( | ) | [inline, 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 52 of file rspConnection.h.
References listen().

| virtual void eq::net::RSPConnection::acceptNB | ( | ) | [inline, 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 54 of file rspConnection.h.
References eq::net::Connection::_state, and eq::net::Connection::STATE_LISTENING.
| ConnectionPtr eq::net::RSPConnection::acceptSync | ( | ) | [virtual] |
Complete an accept operation.
Reimplemented from eq::net::Connection.
Definition at line 234 of file rspConnection.cpp.
References eq::net::Connection::_state, EQINFO, eq::base::RefPtr< T >::get(), and eq::net::Connection::STATE_LISTENING.

| void eq::net::RSPConnection::readNB | ( | void * | buffer, | |
| const uint64_t | bytes | |||
| ) | [inline, virtual] |
Start a read operation on the connection.
This method is the low-level counterpart to recvNB().
This function returns immediately. The operation's Notifier will signal data availability, upon which readSync() should be used to finish the operation.
| buffer | the buffer receiving the data. | |
| bytes | the number of bytes to read. |
Implements eq::net::Connection.
Definition at line 57 of file rspConnection.h.
| int64_t eq::net::RSPConnection::readSync | ( | void * | buffer, | |
| const uint64_t | bytes | |||
| ) | [virtual] |
Finish reading data from the connection.
This method is the low-level counterpart to recvSync(). It may return with a partial read.
| buffer | the buffer receiving the data. | |
| bytes | the number of bytes to read. |
Implements eq::net::Connection.
Definition at line 259 of file rspConnection.cpp.
References eq::net::Connection::_state, EQ_MIN, EQLOG, eq::base::Buffer< T >::getData(), eq::base::MTQueue< T >::isEmpty(), eq::base::MTQueue< T >::pop(), eq::base::LFQueue< T >::push(), and eq::net::Connection::STATE_CONNECTED.

| int64_t eq::net::RSPConnection::write | ( | const void * | buffer, | |
| const uint64_t | bytes | |||
| ) | [virtual] |
Write data to the connection.
| buffer | the buffer containing the message. | |
| bytes | the number of bytes to write. |
Implements eq::net::Connection.
Definition at line 1382 of file rspConnection.cpp.
References eq::net::Connection::_state, EQ_MIN, EQLOG, eq::base::Buffer< T >::getData(), eq::net::ConnectionSet::interrupt(), eq::base::MTQueue< T >::isEmpty(), eq::base::RefPtr< T >::isValid(), eq::base::MTQueue< T >::pop(), eq::base::LFQueue< T >::push(), eq::net::Connection::STATE_CONNECTED, and eq::net::Connection::STATE_LISTENING.

| virtual Notifier eq::net::RSPConnection::getNotifier | ( | ) | const [inline, virtual] |
Reimplemented from eq::net::Connection.
Definition at line 65 of file rspConnection.h.
0.9.1 by
1.6.1