| Qore Programming Language Reference Manual 1.12.2

Public Member Functions | List of all members
Qore::AbstractPollOperation Class Referenceabstract

Abstract poll operation objects provide the polling interface for pollable objects. More...

Inheritance diagram for Qore::AbstractPollOperation:
[legend]

## Public Member Functions
abstract *hash< SocketPollInfo > | continuePoll ()
| Returns a socket poll hash if polling should continue or NOTHING if complete. More...
abstract string | getGoal ()
| Returns the goal. More...
auto | getOutput ()
| Returns any output generated by any completed poll action. More...
abstract string | getState ()
| Returns the current state. More...
abstract bool | goalReached ()
| Returns True when the goal as been reached. More...

## Detailed Description

Abstract poll operation objects provide the polling interface for pollable objects.

This class implements polling logic for pollable operations and the state machine behind it

## Member Function Documentation

## ◆ continuePoll()

abstract *hash<SocketPollInfo> Qore::AbstractPollOperation::continuePoll | ( |  | ) |
| pure virtual

Returns a socket poll hash if polling should continue or NOTHING if complete.

Returns
  NOTHING if there is no more to poll and the poll operation was successful (i.e. the goal was reached), otherwise this method must return a new socket poll hash to continue the polling operation with another operation, after which this method will be called again if a matching event is received for the socket. If a socket poll hash is returned, then the internal state is also updated.

Implemented in Qore::SocketPollOperation.

## ◆ getGoal()

abstract string Qore::AbstractPollOperation::getGoal | ( |  | ) |
| pure virtual

Returns the goal.

Returns
  the goal set in the constructor

Implemented in Qore::SocketPollOperationBase.

## ◆ getOutput()

auto Qore::AbstractPollOperation::getOutput | ( |  | ) |

Returns any output generated by any completed poll action.

Code Flags:
  RET_VALUE_ONLY

Returns
  this base class method always returns NOTHING, reimplement in subclasses to change this behavior

## ◆ getState()

abstract string Qore::AbstractPollOperation::getState | ( |  | ) |
| pure virtual

Returns the current state.

Returns
  the current state

Implemented in Qore::SocketPollOperationBase.

## ◆ goalReached()

abstract bool Qore::AbstractPollOperation::goalReached | ( |  | ) |
| pure virtual

Returns True when the goal as been reached.

Returns
  True when the goal as been reached

Implemented in Qore::SocketPollOperationBase.