eq::net::BufferConnection Class Reference

A proxy connection buffering outgoing data into a memory region. More...

#include <bufferConnection.h>

Inheritance diagram for eq::net::BufferConnection:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

void sendBuffer (ConnectionPtr connection)
uint64_t getSize () const

Protected Member Functions

virtual void readNB (void *buffer, const uint64_t bytes)
 Start a read operation on the connection.
virtual int64_t readSync (void *buffer, const uint64_t bytes)
 Finish reading data from the connection.
virtual int64_t write (const void *buffer, const uint64_t bytes)
 Write data to the connection.


Detailed Description

A proxy connection buffering outgoing data into a memory region.

Definition at line 31 of file bufferConnection.h.


Member Function Documentation

virtual void eq::net::BufferConnection::readNB ( void *  buffer,
const uint64_t  bytes 
) [inline, protected, 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 42 of file bufferConnection.h.

virtual int64_t eq::net::BufferConnection::readSync ( void *  buffer,
const uint64_t  bytes 
) [inline, protected, 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 44 of file bufferConnection.h.

int64_t eq::net::BufferConnection::write ( const void *  buffer,
const uint64_t  bytes 
) [protected, 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 40 of file bufferConnection.cpp.

References eq::base::Buffer< T >::append().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Mon Aug 10 18:58:44 2009 for Equalizer 0.9 by  doxygen 1.5.8