C++ Service wrapper Manages the service's connections.
More...
#include <football.h>
|
|
class | Iterator |
| |
|
class | Connection |
| |
|
class | Arena |
| |
C++ Service wrapper Manages the service's connections.
◆ ServiceBase()
Create a new service with requested options.
Creates the underlying standard C stuff, and a C++ object that wraps it.
- Parameters
-
| options | The service options such as ports, behavior settings, etc. |
| parent | A parent service whose service port(s) the child will share. |
- See also
- fb_create_service ()
◆ allocNewConnection()
| virtual Connection * Football::ServiceBase::allocNewConnection |
( |
| ) |
|
|
protectedpure virtual |
◆ conditional_print()
| ssize_t Football::ServiceBase::conditional_print |
( |
bool(*)(FB_CONNECTION *) |
callback, |
|
|
const std::string & |
message |
|
) |
| |
|
overridevirtual |
◆ myThingie()
| virtual void * Football::ServiceBase::myThingie |
( |
void |
| ) |
const |
|
inlinefinalprotectedvirtual |
◆ newConnectionFromFile()
| Connection * Football::ServiceBase::newConnectionFromFile |
( |
const std::string & |
filename | ) |
|
Create a new "connection" that reads from a file.
Replies to the connection are transparently disposed. An appropriate event is dispatched to the connection when created, but nothing is read from the file yet. The caller may adjust the context or privileges; reading is done by the Arena (service manager) poll routines.
- Parameters
-
| filename | The name of the file to read from. |
- Returns
- An initialized Football::Connection, or NULL on error.
◆ newLoopbackConnection()
| Connection * Football::ServiceBase::newLoopbackConnection |
( |
int * |
loopback | ) |
|
Create a new connection that loops back to the service.
Bidirectional communication is supported. Replies to the connection are transparently disposed. An appropriate event is dispatched to the connection when created, but nothing is read from the file yet. The caller may adjust the context or privileges; reading is done by the Arena (service manager) poll routines.
- Parameters
-
| loopback | On return, set to the socket used for loopback. |
- Returns
- A socket number, or -1 on error.
◆ serviceShutdown()
| void Football::ServiceBase::serviceShutdown |
( |
void |
| ) |
|
|
virtual |
Invoked when a service is shutting down.
Corresponds to FB_EVENT_STOPPED; by the time this is received, all connections have been closed.
The documentation for this class was generated from the following files: