fastcgi++  3.1alpha
A C++ FastCGI/Web API
Fastcgipp::Poll Class Reference

Class for handling OS level socket polling. More...

#include <fastcgi++/poll.hpp>

Classes

class  Result
 Type returned from a poll request. More...
 

Public Member Functions

bool add (const socket_t socket)
 Add a socket identifier to the poll list. More...
 
bool del (const socket_t socket)
 Remove a socket identifier to the poll list. More...
 
Result poll (int timeout)
 Initiate poll on group. More...
 
 Poll ()
 
 ~Poll ()
 

Private Attributes

const typedef int poll_t
 Our polling type using the Linux kernel is simply an int. More...
 
poll_t m_poll
 The OS level polling object. More...
 

Detailed Description

Class for handling OS level socket polling.

This class introduces a layer of abstraction to the polling interface used by the SocketGroup class and other facilities of within fastcgi++. Cross-platform development will require modification of this class.

Date
October 3, 2018
Author
Eddie Carle <eddie.nosp@m.@isa.nosp@m.tec.c.nosp@m.a>

Definition at line 76 of file poll.hpp.

Constructor & Destructor Documentation

◆ Poll()

Fastcgipp::Poll::Poll ( )

Definition at line 56 of file poll.cpp.

◆ ~Poll()

Fastcgipp::Poll::~Poll ( )

Definition at line 62 of file poll.cpp.

References m_poll.

Member Function Documentation

◆ add()

bool Fastcgipp::Poll::add ( const socket_t  socket)

Add a socket identifier to the poll list.

Definition at line 114 of file poll.cpp.

Referenced by Fastcgipp::Curler::Curler(), Fastcgipp::Socket::Socket(), Fastcgipp::Curler::socketCallback(), and Fastcgipp::SocketGroup::SocketGroup().

Here is the caller graph for this function:

◆ del()

bool Fastcgipp::Poll::del ( const socket_t  socket)

Remove a socket identifier to the poll list.

Definition at line 139 of file poll.cpp.

Referenced by Fastcgipp::SQL::Connection::handler(), and Fastcgipp::Curler::socketCallback().

Here is the caller graph for this function:

◆ poll()

Fastcgipp::Poll::Result Fastcgipp::Poll::poll ( int  timeout)

Initiate poll on group.

Parameters
[in]timeout0 means don't block at all. -1 means block indefinitely. A positive integer is the number of milliseconds before blocking times out.

Definition at line 69 of file poll.cpp.

References FAIL_LOG, Fastcgipp::Poll::Result::m_data, Fastcgipp::Poll::Result::m_events, and Fastcgipp::Poll::Result::m_socket.

Referenced by Fastcgipp::Curler::handler(), and Fastcgipp::SQL::Connection::handler().

Here is the caller graph for this function:

Member Data Documentation

◆ m_poll

poll_t Fastcgipp::Poll::m_poll
private

The OS level polling object.

Definition at line 88 of file poll.hpp.

Referenced by ~Poll().

◆ poll_t

const typedef int Fastcgipp::Poll::poll_t
private

Our polling type using the Linux kernel is simply an int.

Definition at line 81 of file poll.hpp.


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