eq::net::EventConnection Class Reference

A connection signalling an event. More...

#include <eventConnection.h>

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

List of all members.

Public Member Functions

virtual bool connect ()
 Connect to the remote peer.
virtual void close ()
 Close a connected or listening connection.
void set ()
void reset ()
virtual Notifier getNotifier () const

Protected Member Functions

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

Detailed Description

A connection signalling an event.

The connection is only useful to signal something to a ConnectionSet. No data can be read or written from it.

Definition at line 33 of file eventConnection.h.


Member Function Documentation

bool eq::net::EventConnection::connect (  )  [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 39 of file eventConnection.cpp.

References eq::net::Connection::_state, eq::net::Connection::STATE_CLOSED, eq::net::Connection::STATE_CONNECTED, and eq::net::Connection::STATE_CONNECTING.

Connection::Notifier eq::net::EventConnection::getNotifier (  )  const [virtual]
Returns:
the notifier signaling events on the connection.

Reimplemented from eq::net::Connection.

Definition at line 106 of file eventConnection.cpp.

virtual void eq::net::EventConnection::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 48 of file eventConnection.h.

virtual int64_t eq::net::EventConnection::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 50 of file eventConnection.h.

virtual int64_t eq::net::EventConnection::write ( const void *  buffer,
const   bytes 
) [inline, 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 52 of file eventConnection.h.


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