Open Lighting Architecture
0.10.4
|
The base Client Wrapper class.
This encapsulates the calls required to setup a connection to olad.
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. More... | |
ola::io::SelectServer * | GetSelectServer () |
Get the SelectServer used by this client. More... | |
bool | Setup () |
Setup the client. More... | |
bool | Cleanup () |
Reset the connection to the server. More... | |
void | SocketClosed () |
Called internally when the client socket is closed. | |
Protected Attributes | |
std::auto_ptr < ola::network::TCPSocket > | m_socket |
bool ola::client::BaseClientWrapper::Cleanup | ( | ) |
Reset the connection to the server.
|
inline |
Get the SelectServer used by this client.
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.
callback | the Callback to run, ownership is transferred. |
bool ola::client::BaseClientWrapper::Setup | ( | ) |
Setup the client.