libktorrent  2.2.0
Public Types | Public Member Functions | Protected Attributes | List of all members
net::WakeUpPipe Class Reference

#include <wakeuppipe.h>

Inheritance diagram for net::WakeUpPipe:
Inheritance graph
[legend]

Public Types

typedef QSharedPointer< WakeUpPipePtr
 
- Public Types inherited from net::PollClient
typedef QSharedPointer< PollClientPtr
 

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.
 
- Public Member Functions inherited from bt::Pipe
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
 
- Protected Attributes inherited from bt::Pipe
int reader
 
int writer
 

Detailed Description

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.


The documentation for this class was generated from the following file: