Stream with a file descriptor that is selectable. More...
#include <dashel-posix.h>
Public Member Functions | |
virtual bool | isDataInRecvBuffer () const =0 |
Return true while there is some unread data in the reception buffer. | |
virtual bool | receiveDataAndCheckDisconnection ()=0 |
If necessary, read a byte and check for disconnection; return true on disconnection, fales otherwise. | |
SelectableStream (const std::string &protocolName) | |
Create the stream and associates a file descriptor. | |
virtual | ~SelectableStream () |
Protected Attributes | |
int | fd |
associated file descriptor | |
bool | writeOnly |
true if we can only write on this stream | |
Friends | |
class | Hub |
Stream with a file descriptor that is selectable.
Definition at line 49 of file dashel-posix.h.
Dashel::SelectableStream::SelectableStream | ( | const std::string & | protocolName | ) |
Create the stream and associates a file descriptor.
Definition at line 310 of file dashel-posix.cpp.
Dashel::SelectableStream::~SelectableStream | ( | ) | [virtual] |
Definition at line 318 of file dashel-posix.cpp.
virtual bool Dashel::SelectableStream::isDataInRecvBuffer | ( | ) | const [pure virtual] |
Return true while there is some unread data in the reception buffer.
Implemented in Dashel::UDPSocketStream, Dashel::SocketServerStream, and Dashel::DisconnectableStream.
virtual bool Dashel::SelectableStream::receiveDataAndCheckDisconnection | ( | ) | [pure virtual] |
If necessary, read a byte and check for disconnection; return true on disconnection, fales otherwise.
Implemented in Dashel::FileDescriptorStream, Dashel::UDPSocketStream, Dashel::SocketServerStream, and Dashel::SocketStream.
friend class Hub [friend] |
Reimplemented from Dashel::Stream.
Reimplemented in Dashel::DisconnectableStream.
Definition at line 54 of file dashel-posix.h.
int Dashel::SelectableStream::fd [protected] |
associated file descriptor
Definition at line 52 of file dashel-posix.h.
bool Dashel::SelectableStream::writeOnly [protected] |
true if we can only write on this stream
Definition at line 53 of file dashel-posix.h.