cp_socket
Section: cp_client (3)
Updated: MARCH 2006
Index
Return to Main Contents
[view source]
NAME
cp_client - tcp client api
SYNOPSIS
#include <cprops/client.h>
cp_client *cp_client_create(char *host, int port);
void cp_client_destroy(cp_client *client);
void cp_client_set_retry(cp_client *client, int retry_count);
int cp_client_connect(cp_client *client);
int cp_client_close(cp_client *client);
int cp_client_read(cp_client *client, char *buf, int len);
int cp_client_read_string(cp_client *client, cp_string *str, int len);
int cp_client_write(cp_client *client, char *buf, int len);
int cp_client_write_string(cp_client *client, cp_string *str);
SSL specific functions
void cp_client_ssl_init();
void cp_client_ssl_shutdown();
cp_client *cp_client_create_ssl(char *host, int port,
char *CA_file, char *CA_directory,
int verification_mode);
int cp_client_verify_hostname(cp_client *client);
X509 *cp_client_get_server_certificate(cp_client *client);
DESCRIPTION
cp_client is a tcp client socket.
cp_client_create
or
cp_client_create_ssl
create a socket to connect to the specified host and port,
cp_client_connect
attempt to create the connection,
cp_client_close
closes the connection and
cp_client_destroy
deallocates the client structure. Once a connection has been established
cp_client_read
or
cp_client_read_string
may be used to read from the open connection and
cp_client_write
or
cp_client_write_string
may be used to write.
SSL functionality is implemented using the openssl api. Functions specific to
secure connections are available if the libcprops installation was configured
to use ssl.
For more on specific functions see the individual function man pages.
SEE ALSO
cp_client_ssl_init(3),
cp_client_create(3),
cp_client_destroy(3),
cp_client_set_retry(3),
cp_client_connect(3),
cp_client_verify_hostname(3),
cp_client_read(3),
cp_client_write(3),
cp_client_close(3)
Index
- NAME
-
- SYNOPSIS
-
- SSL specific functions
-
- DESCRIPTION
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 14:33:55 GMT, March 14, 2006
|
|