#include <rstpserverif.h>
Public Types | |
| typedef void(*) | STRCB (void *, const std::string &) |
Public Member Functions | |
| bool | listen (const std::string &local_addr, unsigned short port, int backlog=10) |
| bool | listen (unsigned short port) |
| bool | notifyData (const char *data, unsigned int size) |
| void | quit () |
| void | setAuthRequired () |
| void | setAuthCredential (const std::string &login, const std::string &pass) |
| void | setAuthPermission (const std::string &login, const std::string &stream) |
| void | clearAuthSettings () |
| void | setMaxClients (unsigned int max_clients) |
| void | setFilterStream (const std::string &stream, const std::string &file) |
| void | setPassStream (const std::string &stream) |
| void | setPipeThrough (const std::string &stream, const std::string &cmd) |
| void | setStreamCache (const std::string &stream, int cache_size, const std::string &file) |
| void | setStreamAddCallback (STRCB func, void *arg=0) |
| void | setStreamDropCallback (STRCB func, void *arg=0) |
| void | addBroadcastData (const std::string &data) |
| void | addBroadcastFile (const std::string &file) |
| void | setBroadcastInterval (unsigned int interval) |
| void | setLogging (const std::string &file, int level=1, std::string progid="") |
| void | setStatusFile (const std::string &file) |
| bool | loadFile (const std::string &filename) |
| void RSTPServerIf::clearAuthSettings | ( | ) |
Clear authentication configuration. Useful when reloading configuration files.
| bool RSTPServerIf::listen | ( | unsigned short | port | ) |
Simplified case of the longer listen()
| bool RSTPServerIf::listen | ( | const std::string & | local_addr, | |
| unsigned short | port, | |||
| int | backlog = 10 | |||
| ) |
| local_addr | The local IP address to bind to (dotted decimal). | |
| port | The local TCP/IP port to bind to. | |
| backlog | The backlog argument for the socket listen() call. |
| bool RSTPServerIf::loadFile | ( | const std::string & | filename | ) |
| filename | The name of the configuration file to load. |
| bool RSTPServerIf::notifyData | ( | const char * | data, | |
| unsigned int | size | |||
| ) |
| data | Pointer to the actual data | |
| size | Length of the data |
| void RSTPServerIf::quit | ( | ) |
Call when you're done for cleanup.
| void RSTPServerIf::setAuthCredential | ( | const std::string & | login, | |
| const std::string & | pass | |||
| ) |
| login | Login name | |
| pass | The password to associate with login |
| void RSTPServerIf::setAuthPermission | ( | const std::string & | login, | |
| const std::string & | stream | |||
| ) |
| login | The login name to authorize | |
| stream | The stream name to authorize for login |
| void RSTPServerIf::setAuthRequired | ( | ) |
Require client authentication
| void RSTPServerIf::setFilterStream | ( | const std::string & | stream, | |
| const std::string & | file | |||
| ) |
| stream | Name of the stream to create. | |
| file | The filter file. |
| void RSTPServerIf::setLogging | ( | const std::string & | file, | |
| int | level = 1, |
|||
| std::string | progid = "" | |||
| ) |
Enable the server log.
| file | The log file to write entries to | |
| level | The logging level - default 1 | |
| progid | Log entry identifier |
| void RSTPServerIf::setMaxClients | ( | unsigned int | max_clients | ) |
Limit concurrent connections.
| max_clients | The maximum number of connections to allow. |
| void RSTPServerIf::setPassStream | ( | const std::string & | stream | ) |
| stream | The catch-all stream name. |
| void RSTPServerIf::setStatusFile | ( | const std::string & | file | ) |
| file | The name of the status file to create. It will be plain text. |
1.4.7