libUPnP 1.14.19
|
Go to the source code of this file.
Data Structures | |
struct | MServerSockArray |
Typedefs | |
typedef struct MServerSockArray | MiniServerSockArray |
typedef void(* | MiniServerCallback) (http_parser_t *parser, http_message_t *request, SOCKINFO *info) |
Functions | |
void | SetHTTPGetCallback (MiniServerCallback callback) |
Set HTTP Get Callback. | |
void | SetSoapCallback (MiniServerCallback callback) |
Set SOAP Callback. | |
void | SetGenaCallback (MiniServerCallback callback) |
Set GENA Callback. | |
int | StartMiniServer (uint16_t *listen_port4, uint16_t *listen_port6, uint16_t *listen_port6UlaGua) |
Initialize the sockets functionality for the Miniserver. | |
int | StopMiniServer () |
Stop and Shutdown the MiniServer and free socket resources. | |
Variables | |
SOCKET | gMiniServerStopSock |
typedef void(* MiniServerCallback) ( http_parser_t *parser, http_message_t *request, SOCKINFO *info) |
void SetGenaCallback | ( | MiniServerCallback | callback | ) |
Set GENA Callback.
[in] | callback | GENA Callback to be invoked. |
Referenced by UpnpInitPreamble().
void SetHTTPGetCallback | ( | MiniServerCallback | callback | ) |
Set HTTP Get Callback.
[in] | callback | HTTP Callback to be invoked . |
Referenced by UpnpEnableWebserver().
void SetSoapCallback | ( | MiniServerCallback | callback | ) |
Set SOAP Callback.
[in] | callback | SOAP Callback to be invoked . |
Referenced by UpnpInitPreamble().
int StartMiniServer | ( | uint16_t * | listen_port4, |
uint16_t * | listen_port6, | ||
uint16_t * | listen_port6UlaGua | ||
) |
Initialize the sockets functionality for the Miniserver.
Initialize a thread pool job to run the MiniServer and the job to the thread pool.
If listen port is 0, port is dynamically picked.
Use timer mechanism to start the MiniServer, failure to meet the allowed delay aborts the attempt to launch the MiniServer.
[in,out] | listen_port4 | Port on which the server listens for incoming IPv4 connections. |
[in,out] | listen_port6 | Port on which the server listens for incoming IPv6 LLA connections. |
[in,out] | listen_port6UlaGua | Port on which the server listens for incoming IPv6 ULA or GUA connections. |
References get_miniserver_stopsock(), get_ssdp_sockets(), gMiniServerThreadPool, gMServState, MServerSockArray::miniServerSock4, MServerSockArray::miniServerSock6, MServerSockArray::miniServerSock6UlaGua, MServerSockArray::miniServerStopSock, MSERV_IDLE, MSERV_RUNNING, RunMiniServer(), sock_close(), MServerSockArray::ssdpReqSock4, MServerSockArray::ssdpReqSock6, MServerSockArray::ssdpSock4, MServerSockArray::ssdpSock6, MServerSockArray::ssdpSock6UlaGua, ThreadPoolAddPersistent(), TPJobInit(), TPJobSetFreeFunction(), TPJobSetPriority(), UPNP_E_INTERNAL_ERROR, UPNP_E_OUTOF_MEMORY, and UPNP_E_SUCCESS.
Referenced by UpnpInitStartServers().
int StopMiniServer | ( | ) |
Stop and Shutdown the MiniServer and free socket resources.
References gMServState, INVALID_SOCKET, miniStopSockPort, MSERV_IDLE, MSERV_RUNNING, MSERV_STOPPING, sock_close(), and UpnpPrintf().
Referenced by UpnpFinish().