![]() |
SOUND4 BIGVOICE.CL Library [1.0.3]
|
Macros | |
| #define | SOUND4_INVALID_WEBSERVER_ID ((uint64_t)-1) |
| #define | SOUND4_WEBSERVER_HTTP_OK (1<<0) |
| #define | SOUND4_WEBSERVER_HTTPS_OK (1<<1) |
Functions | |
| uint64_t | bigvoice_Webserver_tcp (unsigned int listenport, unsigned int listenport_secure, const char *socket_ip, unsigned int socket_port) |
| uint64_t | bigvoice_Webserver_tcp2 (unsigned int listenport, unsigned int listenport_secure, const char *socket_ip, unsigned int socket_port, const struct bigvoice_CParameters *parameters) |
| uint64_t | bigvoice_Webserver (unsigned int listenport, unsigned int listenport_secure, struct bigvoice_CInstance *instance) |
| int | bigvoice_Webserver_Stop (uint64_t id, int timeout_ms) |
| int | bigvoice_Webserver_Status (uint64_t id) |
Run a web server to configure the processor
See also how to setup authentication with Environment variables and parameters. Their use is documented in bigvoice_InitProcess.
| #define SOUND4_INVALID_WEBSERVER_ID ((uint64_t)-1) |
This represents an invalid webserver id bigvoice_Webserver and bigvoice_Webserver_tcp will never return this value
Definition at line 1541 of file sound4.bigvoice.cl.h.
| #define SOUND4_WEBSERVER_HTTP_OK (1<<0) |
If this bit is set in the return value from bigvoice_Webserver_Status, then HTTP server is OK
Definition at line 1546 of file sound4.bigvoice.cl.h.
| #define SOUND4_WEBSERVER_HTTPS_OK (1<<1) |
If this bit is set in the return value from bigvoice_Webserver_Status, then HTTPS server is OK
Definition at line 1550 of file sound4.bigvoice.cl.h.
| uint64_t bigvoice_Webserver | ( | unsigned int | listenport, |
| unsigned int | listenport_secure, | ||
| struct bigvoice_CInstance * | instance | ||
| ) |
Run a web server, connecting to local instance internally (no expose port needed)
This function returns after connecting to the process, and continue to run in background See bigvoice_Webserver_Stop too stop it gracefully
For secure connection, it will use privatekey.pem and certificate.pem from current directory. Environment variables SSL_PRIVATE_PATH and SSL_CERTIFICATE_PATH can override those (see Environment variables and parameters). If none is valid, it will try also /etc/ssl/certs/server.key and /etc/ssl/certs/server.crt.
| listenport | The port to listen for HTTP connections (0 to disable) |
| listenport_secure | The port to listen for HTTPS connections (0 to disable) |
| instance | The process instance to connect to |
| int bigvoice_Webserver_Status | ( | uint64_t | id | ) |
Get the web server status
| id | The web server Id, returned by bigvoice_Webserver_tcp or bigvoice_Webserver |
| int bigvoice_Webserver_Stop | ( | uint64_t | id, |
| int | timeout_ms | ||
| ) |
Stop a web server started with bigvoice_Webserver_tcp
| id | The web server Id, returned by bigvoice_Webserver_tcp or bigvoice_Webserver |
| timeout_ms | The timeout to wait gracefull shutdown |
| uint64_t bigvoice_Webserver_tcp | ( | unsigned int | listenport, |
| unsigned int | listenport_secure, | ||
| const char * | socket_ip, | ||
| unsigned int | socket_port | ||
| ) |
Run a web server, connecting to process with JSON over TCP
This function returns after connecting to the process, and continue to run in background See bigvoice_Webserver_Stop too stop it gracefully
For secure connection, it will use privatekey.pem and certificate.pem from current directory. Environment variables SSL_PRIVATE_PATH and SSL_CERTIFICATE_PATH can override those (see Environment variables and parameters). If none is valid, it will try also /etc/ssl/certs/server.key and /etc/ssl/certs/server.crt.
| listenport | The port to listen for HTTP connections |
| listenport_secure | The port to listen for HTTPS connections |
| socket_ip | The ip of the process to connect to |
| socket_port | The port of the process's JSON server to connect to |
| uint64_t bigvoice_Webserver_tcp2 | ( | unsigned int | listenport, |
| unsigned int | listenport_secure, | ||
| const char * | socket_ip, | ||
| unsigned int | socket_port, | ||
| const struct bigvoice_CParameters * | parameters | ||
| ) |
Run a web server, connecting to process with JSON over TCP, using parameters
This function returns after connecting to the process, and continue to run in background See bigvoice_Webserver_Stop too stop it gracefully
For secure connection, it will use privatekey.pem and certificate.pem from current directory. Environment variables SSL_PRIVATE_PATH and SSL_CERTIFICATE_PATH can override those (see Environment variables and parameters). If none is valid, it will try also /etc/ssl/certs/server.key and /etc/ssl/certs/server.crt.
| listenport | The port to listen for HTTP connections |
| listenport_secure | The port to listen for HTTPS connections |
| socket_ip | The ip of the process to connect to |
| socket_port | The port of the process's JSON server to connect to |
| parameters | The parameters to use, created with bigvoice_NewParameters |