eq::net::FDConnection Class Reference

#include <fdConnection.h>

Inheritance diagram for eq::net::FDConnection:

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

Collaboration graph
[legend]

List of all members.


Detailed Description

A generic file descriptor-based connection, to be subclassed.

Definition at line 19 of file fdConnection.h.


Public Member Functions

virtual int64_t read (void *buffer, const uint64_t bytes)
 Read data from the connection.
virtual int64_t write (const void *buffer, const uint64_t bytes) const
 Write data to the connection.
virtual ReadNotifier getReadNotifier () const
bool hasData () const

Protected Member Functions

 FDConnection (const FDConnection &conn)

Protected Attributes

int _readFD
 The read file descriptor.
int _writeFD
 The write file descriptor.

Friends

std::ostream & operator<< (std::ostream &os, const FDConnection *connection)

Member Function Documentation

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

Read data from the connection.

Note the the a return value of 0 is not an error condition, it means that no data was pending on a non-blocking connection.

Parameters:
buffer the buffer for saving the message.
bytes the number of bytes to read.
Returns:
the number of bytes read, or -1 upon error.

Implements eq::net::Connection.

Definition at line 37 of file fdConnection.cpp.

References _readFD, and eq::net::Connection::close().

Here is the call graph for this function:

int64_t eq::net::FDConnection::write ( const void *  buffer,
const uint64_t  bytes 
) const [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 67 of file fdConnection.cpp.

References _writeFD.


The documentation for this class was generated from the following files:
Generated on Sat Dec 6 12:01:51 2008 for Equalizer 0.6 by  doxygen 1.5.5