C++ Connection wrapper.
More...
#include <football.h>
◆ ~Connection()
| Football::Connection::~Connection |
( |
| ) |
|
|
overridevirtual |
◆ acceptInput()
| void Football::Connection::acceptInput |
( |
bool |
mode | ) |
|
Control acceptance of input.
- Parameters
-
| mode | If true, enables input. If false, the connection is ignored; received input will be queued and received when input is again enabled. |
◆ argvIndex()
| int Football::Connection::argvIndex |
( |
const char * |
itemname | ) |
const |
|
private |
◆ close()
| void Football::Connection::close |
( |
void |
| ) |
|
Initiate connection closure.
◆ conditional_print()
| ssize_t Football::Connection::conditional_print |
( |
bool(*)(FB_CONNECTION *) |
callback, |
|
|
const std::string & |
message |
|
) |
| |
|
overridevirtual |
Send a message to some output queues depending on the callback function return value.
- Parameters
-
| callback | A callback function accepting FB_CONNECTION * that returns true to broadcast to, false to skip. |
| message | The message to put on the output queue. |
Implements Football::Thingie.
◆ connectionClose()
| void Football::Connection::connectionClose |
( |
const FB_EVENT * |
event | ) |
|
|
virtual |
Invoked when a connection is closing.
Corresponds to FB_EVENT_CLOSE event. This is the last notification/event for a connection before it closes.
- Parameters
-
| event | Closing connection details. |
Reimplemented in PianodConnection.
◆ getFromOld()
Find the C++ connection object from the old-style C connection. If there isn't one yet, create it one.
- Parameters
-
| connection | The Football standard C connection structure. |
- Returns
- The C++ connection object.
◆ inputReceived()
| void Football::Connection::inputReceived |
( |
const FB_EVENT * |
event | ) |
|
|
virtual |
Invoked when a completed message is received.
Corresponds to FB_EVENT_INPUT event.
- Parameters
-
| event | Details of the message received. |
Reimplemented in PianodConnection.
◆ myThingie()
| virtual void* Football::Connection::myThingie |
( |
void |
| ) |
const |
|
inlinefinalprivatevirtual |
◆ newConnection()
| void Football::Connection::newConnection |
( |
const FB_EVENT * |
event | ) |
|
|
virtual |
Invoked when a new connection has arrived/greeted.
Corresponds to FB_EVENT_CONNECT.
- Parameters
-
| event | The new connection details, or a nullptr for transferred connections. |
Reimplemented in PianodConnection.
◆ service()
| ServiceBase * Football::Connection::service |
( |
void |
| ) |
const |
Get a connection's parent service.
- Returns
- The C++ service object for the connection.
◆ setConnection()
◆ transfer()
| bool Football::Connection::transfer |
( |
ServiceBase * |
newservice, |
|
|
bool |
invokeNewConnectionHandler = false |
|
) |
| |
Transfer a connection to another service.
- Parameters
-
| newservice | The service to transfer to. |
| invokeNewConnectionHandler | If true, the newConnection handler is invoked with a nullptr. |
◆ tryGetFromOld()
Try to retrieve the C++ connection object from the old-style C connection.
- Parameters
-
| connection | The Football standard C connection structure. |
- Returns
- The C++ connection object, or NULL if there is none.
◆ Arena
◆ Iterator
◆ ServiceBase
◆ argname_capacity
| int Football::Connection::argname_capacity = 0 |
|
private |
◆ connection
Pointer to underlying Football connection.
The documentation for this class was generated from the following files: