SCTC
the soundcloud.com terminal client
Functions
tls.h File Reference

Exported functions required for handling encrypted (TLS) TCP/IP connections. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool tls_init ()
 Global initialization of TLS. More...
 
struct network_conntls_connect (char *server, int port)
 Connect an encrypted TCP/IP socket to server:port. More...
 
bool tls_finalize ()
 Free previous global initialization of TLS. More...
 

Detailed Description

Exported functions required for handling encrypted (TLS) TCP/IP connections.

Function Documentation

struct network_conn* tls_connect ( char *  server,
int  port 
)

Connect an encrypted TCP/IP socket to server:port.

Parameters
serverThe server to connect to, either an IP or a hostname.
portThe servers port (0 <= port <= 65536)
Returns
Pointer to a network_conn struct, or NULL in case of an error

Here is the call graph for this function:

Here is the caller graph for this function:

bool tls_finalize ( )

Free previous global initialization of TLS.

Returns
true in case of success, false otherwise

Here is the caller graph for this function:

bool tls_init ( )

Global initialization of TLS.

This function is required to be called prior to the first call tls_connect(). Global initialization, such as loading the list of trusted CAs is performed here.

Returns
true in case of success, false otherwise

Here is the caller graph for this function: