LibHTTP API Reference

December 26, 2016 ยท View on GitHub

httplib_connect_client( host, port, use_ssl, error_buffer, error_buffer_size );

Parameters

ParameterTypeDescription
hostconst char *hostname or IP address of the server
portintThe port to connect to on the server
use_sslintConnects using SSL of this value is not zero
error_bufferchar *Buffer to store an error message
error_buffer_sizesize_tMaximum size of the error buffer including the NUL terminator

Return Value

TypeDescription
struct httplib_connection *A pointer to the connection or NULL when an error occurs

Description

The function httplib_connect_client() connects to a TCP server as a client. This server can be a HTTP server but this is not necessary. The function returns a pointer to a connection structure when the connection is established and NULL otherwise.

See Also