Open Lighting Architecture: ola::client::BaseClientWrapper Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
ola::client::BaseClientWrapper Class Referenceabstract

## Detailed Description

The base Client Wrapper class.

This encapsulates the calls required to setup a connection to olad.

Inheritance diagram for ola::client::BaseClientWrapper:

## Public Types
typedef Callback0< void > | CloseCallback

## Public Member Functions
void | SetCloseCallback (CloseCallback *callback)
| Set the callback to be run when the client socket is closed.
ola::io::SelectServer * | GetSelectServer ()
| Get the SelectServer used by this client.
bool | Setup ()
| Setup the client.
bool | Cleanup ()
| Reset the connection to the server.
void | SocketClosed ()
| Called internally when the client socket is closed.

## Protected Attributes
std::auto_ptr< ola::network::TCPSocket > | m_socket

## Member Function Documentation

## ◆ Cleanup()

bool ola::client::BaseClientWrapper::Cleanup | ( |  | ) |

Reset the connection to the server.

Returns
  true if the reset succeeded, false otherwise.

## ◆ GetSelectServer()

ola::io::SelectServer * ola::client::BaseClientWrapper::GetSelectServer | ( |  | ) |
| inline

Get the SelectServer used by this client.

Returns
  A pointer to a SelectServer, ownership isn't transferred.

## ◆ SetCloseCallback()

void ola::client::BaseClientWrapper::SetCloseCallback | ( | CloseCallback * | callback | ) |

Set the callback to be run when the client socket is closed.

The default action is to terminate the SelectServer. By setting a callback you can override this behavior.

Parameters

  callback | the Callback to run, ownership is transferred.

## ◆ Setup()

bool ola::client::BaseClientWrapper::Setup | ( |  | ) |

Setup the client.

Returns
  true on success, false on failure.

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

- include/ola/client/ClientWrapper.h
- ola/OlaClientWrapper.cpp