libktorrent
2.2.0
|
#include <wakeuppipe.h>
Public Types | |
typedef QSharedPointer< WakeUpPipe > | Ptr |
![]() | |
typedef QSharedPointer< PollClient > | Ptr |
Public Member Functions | |
int | fd () const override |
Get the filedescriptor to poll. | |
void | handleData () override |
Read all the dummy data. | |
void | reset () override |
Reset the client called after poll finishes. | |
virtual void | wakeUp () |
Wake up the other socket. | |
bool | wokenUp () const |
Have we been woken up. | |
![]() | |
int | read (Uint8 *buffer, int max_len) |
Read data from the read end of the pipe. | |
int | readerSocket () const |
Get the reader socket. | |
int | write (const Uint8 *data, int len) |
Write data to the write end of the pipe. | |
int | writerSocket () const |
Get the writer socket. | |
Protected Attributes | |
QMutex | mutex |
bool | woken_up |
![]() | |
int | reader |
int | writer |
A WakeUpPipe's purpose is to wakeup a select or poll call. It works by using a pipe One end needs to be part of the poll or select, and the other end will send dummy data to it. Waking up the select or poll call.
Definition at line 55 of file wakeuppipe.h.