Ecore_Con (3) - Linux Manuals
Ecore_Con: Sockets functions.
NAME
Ecore_Con.h - Sockets functions.
SYNOPSIS
Typedefs
typedef struct _Ecore_Con_Server Ecore_Con_Server
A connection handle.
typedef struct _Ecore_Con_Client Ecore_Con_Client
A connection handle.
Functions
EAPI int ecore_con_init (void)
Initialises the Ecore_Con library.
EAPI int ecore_con_shutdown (void)
Shuts down the Ecore_Con library.
EAPI Ecore_Con_Server * ecore_con_server_add (Ecore_Con_Type type, const char *name, int port, const void *data)
Creates a server to listen for connections.
EAPI Ecore_Con_Server * ecore_con_server_connect (Ecore_Con_Type type, const char *name, int port, const void *data)
Creates a server object to represent the server listening at the given port.
EAPI void * ecore_con_server_del (Ecore_Con_Server *svr)
Closes the connection and frees the given server.
EAPI void * ecore_con_server_data_get (Ecore_Con_Server *svr)
Retrieves the data associated with the given server.
EAPI int ecore_con_server_connected_get (Ecore_Con_Server *svr)
Retrieves whether the given server is currently connected.
EAPI Ecore_List * ecore_con_server_clients_get (Ecore_Con_Server *svr)
Retrieves the current list of clients.
EAPI int ecore_con_server_send (Ecore_Con_Server *svr, const void *data, int size)
Sends the given data to the given server.
EAPI void ecore_con_server_client_limit_set (Ecore_Con_Server *svr, int client_limit, char reject_excess_clients)
Sets a limit on the number of clients that can be handled concurrently by the given server, and a policy on what to do if excess clients try to connect.
EAPI char * ecore_con_server_ip_get (Ecore_Con_Server *svr)
Gets the IP address of a server that has been connected to.
EAPI void ecore_con_server_flush (Ecore_Con_Server *svr)
Flushes all pending data to the given server.
EAPI int ecore_con_client_send (Ecore_Con_Client *cl, const void *data, int size)
Sends the given data to the given client.
EAPI Ecore_Con_Server * ecore_con_client_server_get (Ecore_Con_Client *cl)
Retrieves the server representing the socket the client has connected to.
EAPI void * ecore_con_client_del (Ecore_Con_Client *cl)
Closes the connection and frees memory allocated to the given client.
EAPI void ecore_con_client_data_set (Ecore_Con_Client *cl, const void *data)
Sets the data associated with the given client to data.
EAPI void * ecore_con_client_data_get (Ecore_Con_Client *cl)
Retrieves the data associated with the given client.
EAPI char * ecore_con_client_ip_get (Ecore_Con_Client *cl)
Gets the IP address of a cleint that has connected.
EAPI void ecore_con_client_flush (Ecore_Con_Client *cl)
Flushes all pending data to the given client.
EAPI int ecore_con_ssl_available_get (void)
Returns if SSL support is available.
EAPI int ecore_con_url_init (void)
Initialises the Ecore_Con_Url library.
EAPI int ecore_con_url_shutdown (void)
Shuts down the Ecore_Con_Url library.
EAPI Ecore_Con_Url * ecore_con_url_new (const char *url)
Creates and initializes a new Ecore_Con_Url.
EAPI void ecore_con_url_destroy (Ecore_Con_Url *url_con)
Frees the Ecore_Con_Url.
EAPI void ecore_con_url_data_set (Ecore_Con_Url *url_con, void *data)
FIXME: To be documented.
EAPI void * ecore_con_url_data_get (Ecore_Con_Url *url_con)
FIXME: To be documented.
EAPI int ecore_con_url_url_set (Ecore_Con_Url *url_con, const char *url)
FIXME: To be documented.
EAPI void ecore_con_url_fd_set (Ecore_Con_Url *url_con, int fd)
FIXME: To be documented.
EAPI int ecore_con_url_received_bytes_get (Ecore_Con_Url *url_con)
FIXME: To be documented.
EAPI int ecore_con_url_send (Ecore_Con_Url *url_con, void *data, size_t length, char *content_type)
FIXME: To be documented.
EAPI void ecore_con_url_time (Ecore_Con_Url *url_con, Ecore_Con_Url_Time condition, time_t tm)
FIXME: To be documented.
EAPI int ecore_con_url_ftp_upload (Ecore_Con_Url *url_con, char *filename, char *user, char *pass, char *upload_dir)
Makes a FTP upload.
EAPI void ecore_con_url_verbose_set (Ecore_Con_Url *url_con, int verbose)
Enable or disable libcurl verbose output, useful for debug.
EAPI void ecore_con_url_ftp_use_epsv_set (Ecore_Con_Url *url_con, int use_epsv)
Enable or disable EPSV extension.
Detailed Description
Sockets functions.
The Ecore Connection Library ( Ecore_Con ) provides simple mechanisms for communications between programs using reliable sockets. It saves the programmer from having to worry about file descripters and waiting for incoming connections.
There are two main objects in the Ecore_Con library: the Ecore_Con_Server and the Ecore_Con_Client.
The Ecore_Con_Server represents a server that can be connected to. It is used regardless of whether the program is acting as a server or client itself.
To create a listening server, call ecore_con_server_add().
To connect to a server, call ecore_con_server_connect(). Data can then be sent to the server using the ecore_con_server_send().
Whenever a client connection is made to an Ecore_Con_Server, a ECORE_CON_CLIENT_ADD event is emitted. Any event callbacks that are called receive a Ecore_Con_Client object, which represents a connection that that particular client.
Functions are described in the following groupings:
- *
- Ecore Connection Library Functions
- *
- Ecore Connection Server Functions
- *
- Ecore Connection Client Functions
- *
- Ecore URL Connection Functions
Author
Generated automatically by Doxygen for Ecore from the source code.