Server
/* @file aisl/types.h */
typedef struct aisl_server * AislServer;
Pointer of this type represents HTTP server. Memory allocation and release are done inside the library according to provided configuration for aisl_new function.
Events
AislServer
can be a source of the following events:
AISL_EVENT_SERVER_READY
AISL_EVENT_SERVER_ERROR
Functions
Function aisl_server_get_instance
Gets AislInstance associated with AislServer
AislInstance
aisl_server_get_instance(AislServer server);
Arguments
server
—AislServer
pointer
Return value
Associated AislInstance
Function aisl_server_get_address
Copies server address and port to provided sockaddr_in structure
void
aisl_server_get_address(AislServer server, struct sockaddr_in *address);
Arguments
server
— anAislServer
pointeraddress
— a pointer to an output structure
Return value
Returns no value.
Function aisl_server_get_ssl
Checks if server works on HTTPS (secure) or HTTP (unsecure) protocol
bool
aisl_server_get_ssl(AislServer server);
Arguments
server
—AislServer
pointer
Return value
true
— if server is securefalse
— if server is unsecure