eq::net::RSPConnection Class Reference

A rsp connection (Attn: only multicast usage implemented). More...

#include <rspConnection.h>

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

List of all members.

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

Detailed Description

A rsp connection (Attn: only multicast usage implemented).

Definition at line 42 of file rspConnection.h.


Constructor & Destructor Documentation

eq::net::RSPConnection::RSPConnection (  ) 

Member Function Documentation

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.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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.

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

Here is the call graph for this function:

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.

See also:
acceptSync()

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.

Returns:
the new connection, 0 on error.

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.

Here is the call graph for this function:

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.

Parameters:
buffer the buffer receiving the data.
bytes the number of bytes to read.
See also:
readSync()

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.

Parameters:
buffer the buffer receiving the data.
bytes the number of bytes to read.
Returns:
the number of bytes read, or -1 upon error.

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.

Here is the call graph for this function:

int64_t eq::net::RSPConnection::write ( const void *  buffer,
const uint64_t  bytes 
) [virtual]

Write data to the connection.

Parameters:
buffer the buffer containing the message.
bytes the number of bytes to write.
Returns:
the number of bytes written, or -1 upon error.

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.

Here is the call graph for this function:

virtual Notifier eq::net::RSPConnection::getNotifier (  )  const [inline, virtual]
See also:
Connection::getNotifier

Reimplemented from eq::net::Connection.

Definition at line 65 of file rspConnection.h.


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