ecore_con_client_example.c

Shows how to write a simple client (dialer that connects to the example server using ecore_con_server_connect().

Shows how to write a simple client (dialer that connects to the example server using ecore_con_server_connect().

//Compile with:
// gcc -o ecore_con_client_example ecore_con_client_example.c `pkg-config --libs --cflags ecore ecore-con eina`
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <Ecore.h>
#include <Ecore_Con.h>
#include <Ecore_Getopt.h>
/* Ecore_Con client example
* 2010 Mike Blumenkrantz
*/
static Ecore_Con_Server *svr;
static int retval = EXIT_SUCCESS;
static Eina_Bool do_flush = EINA_FALSE;
static Eina_Bool single_message = EINA_FALSE;
static Eina_Bool verify = EINA_TRUE;
static Eina_Bool hostname_verify = EINA_TRUE;
static Eina_Bool do_ssl_upgrade = EINA_FALSE;
static char *starttls_local_command = NULL;
static Eina_Bool
_setup_ssl(void)
{
Eina_Iterator *it;
const char *ca;
if (!(it = eina_file_ls("/etc/ssl/certs")))
{
retval = EXIT_FAILURE;
return EINA_FALSE;
}
/* add all the CAs */
EINA_ITERATOR_FOREACH(it, ca)
{
if (!ecore_con_ssl_server_cafile_add(svr, ca))
fprintf(stderr, "WARNING: could not load CA: %s!\n", ca);
eina_stringshare_del(ca);
}
eina_iterator_free(it);
if (verify)
ecore_con_ssl_server_verify(svr);
if (hostname_verify)
ecore_con_ssl_server_verify_basic(svr);
return EINA_TRUE;
}
static Eina_Bool
_on_stdin(void *data EINA_UNUSED, Ecore_Fd_Handler *fdh EINA_UNUSED)
{
char *line = NULL;
#ifdef _WIN32
char lbuf[4096] = "";
ssize_t r;
if (fgets(lbuf, sizeof(lbuf), stdin) == NULL)
r = -1;
else
{
line = strdup(lbuf);
r = strlen(line);
}
#else
size_t len = 0;
ssize_t r = getline(&line, &len, stdin);
#endif
if (r < 0)
{
fprintf(stderr, "ERROR: could not read from stdin: %s\n", strerror(errno));
return ECORE_CALLBACK_CANCEL;
}
if (!svr)
fputs("WARNING: not connected to server, ignored input.\n", stderr);
else
{
size_t clen = strlen(starttls_local_command);
if (do_ssl_upgrade && ((size_t)r > clen) &&
(strncmp(line, starttls_local_command, clen) == 0) &&
(line[clen] == '\n' || line[clen] == '\r'))
{
printf("INFO: starting SSL communication...\n");
if (!ecore_con_ssl_server_upgrade(svr, ECORE_CON_USE_MIXED | ECORE_CON_LOAD_CERT))
{
printf("ERROR: failed to upgrade to SSL!\n");
retval = EXIT_FAILURE;
ecore_con_server_del(svr);
ecore_main_loop_quit();
}
#if 1
/* This just works since EFL v 1.19. Prior to this,
* upgrade couldn't get any extra setup, such as
* certificate or verification mode as OpenSSL would
* complain.
*/
else if (!_setup_ssl())
{
retval = EXIT_FAILURE;
ecore_con_server_del(svr);
ecore_main_loop_quit();
}
#endif
svr = NULL; /* it's considered dead until ECORE_CON_EVENT_SERVER_UPGRADE */
goto end;
}
ecore_con_server_send(svr, line, r);
printf("INFO: sent %zd bytes to server.\n", r);
if (do_flush) ecore_con_server_flush(svr);
if (single_message)
{
ecore_con_server_del(svr);
svr = NULL;
ecore_main_loop_quit();
}
}
end:
free(line);
return ECORE_CALLBACK_RENEW;
}
Eina_Bool
_add(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Con_Event_Server_Add *ev)
{
printf("Server with ip %s connected!\n", ecore_con_server_ip_get(ev->server));
if (do_ssl_upgrade)
printf("INFO: Not sending 'hello!' in tcp+ssl mode. Use: %s to upgrade the connection\n", starttls_local_command);
else
ecore_con_server_send(ev->server, "hello!", strlen("hello!"));
if (do_flush) ecore_con_server_flush(ev->server);
return ECORE_CALLBACK_RENEW;
}
Eina_Bool
_del(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Con_Event_Server_Del *ev)
{
printf("Lost server with ip %s!\n", ecore_con_server_ip_get(ev->server));
ecore_con_server_del(svr);
svr = NULL;
ecore_main_loop_quit();
return ECORE_CALLBACK_RENEW;
}
Eina_Bool
_data(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Con_Event_Server_Data *ev)
{
printf("Received %i bytes from server:\n"
">>>>>\n"
"%.*s\n"
">>>>>\n",
ev->size,
ev->size, (const char *)ev->data);
return ECORE_CALLBACK_RENEW;
}
Eina_Bool
_write_(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Con_Event_Server_Write *ev)
{
printf("Sent %d bytes to server\n", ev->size);
return ECORE_CALLBACK_RENEW;
}
Eina_Bool
_error(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Con_Event_Server_Error *ev)
{
printf("Server Error: %s\n", ev->error);
return ECORE_CALLBACK_RENEW;
}
Eina_Bool
_upgrade(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Con_Event_Server_Upgrade *ev)
{
printf("Server upgraded to SSL %p %s\n", ev->server, ecore_con_server_ip_get(ev->server));
svr = ev->server;
return ECORE_CALLBACK_RENEW;
}
static const char *types_strs[] = {
"tcp",
"udp",
"ssl",
"tcp+ssl",
"local-user",
"local-system",
NULL
};
static const Ecore_Getopt options = {
"ecore_con_client_example", /* program name */
NULL, /* usage line */
"1", /* version */
"(C) 2016 Enlightenment Project; 2010 Mike Blumenkrantz", /* copyright */
"BSD 2-Clause", /* license */
/* long description, may be multiline and contain \n */
"Example of ecore_con_server_connect()\n",
EINA_FALSE,
{
ECORE_GETOPT_CHOICE('t', "type", "Server type to use, defaults to 'tcp'", types_strs),
ECORE_GETOPT_STORE_TRUE('P', "no-proxy", "Do not use SOCKS proxy for remote connections."),
ECORE_GETOPT_STORE_TRUE('f', "flush", "Force a flush after every send call."),
ECORE_GETOPT_STORE_TRUE('m', "single-message", "Send a single message and delete the server."),
ECORE_GETOPT_STORE_STR('c', "starttls-local-command", "The string to use as a local command (it's NOT sent to remote peer) to upgrade connections when -t/--type=tcp+ssl. Defaults to STARTTLS, however if you need to send that to the server, change the string with this option."),
ECORE_GETOPT_STORE_FALSE(0, "no-verify", "Do not verify server's certificate"),
ECORE_GETOPT_STORE_FALSE(0, "no-hostname-verify", "Do not Verify server's hostname based on its certificate."),
ECORE_GETOPT_VERSION('V', "version"),
ECORE_GETOPT_COPYRIGHT('C', "copyright"),
ECORE_GETOPT_LICENSE('L', "license"),
ECORE_GETOPT_HELP('h', "help"),
ECORE_GETOPT_STORE_METAVAR_STR(0, NULL, "The server name.", "name"),
ECORE_GETOPT_STORE_METAVAR_INT(0, NULL, "The server port.", "port"),
ECORE_GETOPT_SENTINEL
}
};
int
main(int argc, char *argv[])
{
char *name = NULL;
char *type_choice = NULL;
Ecore_Con_Type type;
int port = -1;
Eina_Bool no_proxy = EINA_FALSE;
Eina_Bool quit_option = EINA_FALSE;
Ecore_Getopt_Value values[] = {
ECORE_GETOPT_VALUE_STR(type_choice),
ECORE_GETOPT_VALUE_BOOL(no_proxy),
ECORE_GETOPT_VALUE_BOOL(do_flush),
ECORE_GETOPT_VALUE_BOOL(single_message),
ECORE_GETOPT_VALUE_STR(starttls_local_command),
ECORE_GETOPT_VALUE_BOOL(verify),
ECORE_GETOPT_VALUE_BOOL(hostname_verify),
/* standard block to provide version, copyright, license and help */
ECORE_GETOPT_VALUE_BOOL(quit_option), /* -V/--version quits */
ECORE_GETOPT_VALUE_BOOL(quit_option), /* -C/--copyright quits */
ECORE_GETOPT_VALUE_BOOL(quit_option), /* -L/--license quits */
ECORE_GETOPT_VALUE_BOOL(quit_option), /* -h/--help quits */
/* positional argument */
ECORE_GETOPT_VALUE_STR(name),
ECORE_GETOPT_VALUE_INT(port),
ECORE_GETOPT_VALUE_NONE /* sentinel */
};
int args;
eina_init();
ecore_init();
ecore_con_init();
args = ecore_getopt_parse(&options, values, argc, argv);
if (args < 0)
{
fputs("ERROR: Could not parse command line options.\n", stderr);
retval = EXIT_FAILURE;
goto end;
}
if (quit_option) goto end;
args = ecore_getopt_parse_positional(&options, values, argc, argv, args);
if (args < 0)
{
fputs("ERROR: Could not parse positional arguments.\n", stderr);
retval = EXIT_FAILURE;
goto end;
}
if (!type_choice) type_choice = "tcp";
if (strcmp(type_choice, "tcp") == 0)
type = ECORE_CON_REMOTE_TCP;
else if (strcmp(type_choice, "udp") == 0)
type = ECORE_CON_REMOTE_UDP;
else if (strcmp(type_choice, "ssl") == 0)
type = ECORE_CON_REMOTE_TCP | ECORE_CON_USE_MIXED | ECORE_CON_LOAD_CERT;
else if (strcmp(type_choice, "tcp+ssl") == 0)
{
type = ECORE_CON_REMOTE_TCP;
do_ssl_upgrade = EINA_TRUE;
}
else if (strcmp(type_choice, "local-user") == 0)
type = ECORE_CON_LOCAL_USER;
else if (strcmp(type_choice, "local-system") == 0)
type = ECORE_CON_LOCAL_SYSTEM;
else
{
fprintf(stderr, "ERROR: unsupported --type/-t '%s'\n", type_choice);
retval = EXIT_FAILURE;
goto end;
}
if ((!starttls_local_command) || (starttls_local_command[0] == '\0'))
starttls_local_command = "STARTTLS";
if (no_proxy) type |= ECORE_CON_NO_PROXY;
svr = ecore_con_server_connect(type, name, port, NULL);
if (!svr) goto end;
if (strcmp(type_choice, "ssl") == 0)
{
if (!_setup_ssl())
goto no_mainloop;
}
/* set event handler for server connect */
ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ADD, (Ecore_Event_Handler_Cb)_add, NULL);
/* set event handler for server disconnect */
ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DEL, (Ecore_Event_Handler_Cb)_del, NULL);
/* set event handler for receiving server data */
ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA, (Ecore_Event_Handler_Cb)_data, NULL);
/* set event handler that notifies of sent data */
ecore_event_handler_add(ECORE_CON_EVENT_SERVER_WRITE, (Ecore_Event_Handler_Cb)_write_, NULL);
/* set event handler that notifies of errors */
ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ERROR, (Ecore_Event_Handler_Cb)_error, NULL);
/* set event handler that notifies of upgrades */
ecore_event_handler_add(ECORE_CON_EVENT_SERVER_UPGRADE, (Ecore_Event_Handler_Cb)_upgrade, NULL);
ecore_main_fd_handler_add(STDIN_FILENO, ECORE_FD_READ, _on_stdin, NULL, NULL, NULL);
/* start client */
ecore_main_loop_begin();
no_mainloop:
if (svr)
{
ecore_con_server_del(svr);
svr = NULL;
}
end:
ecore_con_shutdown();
ecore_shutdown();
eina_shutdown();
return retval;
}
Ecore_Con_Event_Server_Data
struct _Ecore_Con_Event_Server_Data Ecore_Con_Event_Server_Data
Used as the data param for the corresponding event.
Definition Ecore_Con.h:393
ECORE_CON_EVENT_SERVER_ADD
ECORE_CON_API int ECORE_CON_EVENT_SERVER_ADD
A server was created.
Definition ecore_con_legacy.c:160
ECORE_CON_EVENT_SERVER_UPGRADE
ECORE_CON_API int ECORE_CON_EVENT_SERVER_UPGRADE
A server connection has been upgraded to SSL.
Definition ecore_con_legacy.c:164
Ecore_Con_Event_Server_Add
struct _Ecore_Con_Event_Server_Add Ecore_Con_Event_Server_Add
Used as the data param for the corresponding event.
Definition Ecore_Con.h:361
Ecore_Con_Event_Server_Error
struct _Ecore_Con_Event_Server_Error Ecore_Con_Event_Server_Error
Used as the data param for the corresponding event.
Definition Ecore_Con.h:381
ECORE_CON_EVENT_SERVER_DEL
ECORE_CON_API int ECORE_CON_EVENT_SERVER_DEL
A server connection was lost.
Definition ecore_con_legacy.c:154
Ecore_Con_Event_Server_Del
struct _Ecore_Con_Event_Server_Del Ecore_Con_Event_Server_Del
Used as the data param for the corresponding event.
Definition Ecore_Con.h:374
Ecore_Con_Event_Server_Upgrade
struct _Ecore_Con_Event_Server_Upgrade Ecore_Con_Event_Server_Upgrade
Used as the data param for the corresponding event.
Definition Ecore_Con.h:368
Ecore_Con_Event_Server_Write
struct _Ecore_Con_Event_Server_Write Ecore_Con_Event_Server_Write
Used as the data param for the corresponding event.
Definition Ecore_Con.h:407
ECORE_CON_EVENT_SERVER_DATA
ECORE_CON_API int ECORE_CON_EVENT_SERVER_DATA
A server connection object has data.
Definition ecore_con_legacy.c:161
ECORE_CON_EVENT_SERVER_WRITE
ECORE_CON_API int ECORE_CON_EVENT_SERVER_WRITE
A server connection object has sent data.
Definition ecore_con_legacy.c:162
ECORE_CON_EVENT_SERVER_ERROR
ECORE_CON_API int ECORE_CON_EVENT_SERVER_ERROR
A server experienced an error.
Definition ecore_con_legacy.c:155
ecore_con_shutdown
ECORE_CON_API int ecore_con_shutdown(void)
Shuts down the Ecore_Con library.
Definition ecore_con.c:133
ecore_con_init
ECORE_CON_API int ecore_con_init(void)
Initializes the Ecore_Con library.
Definition ecore_con.c:68
ecore_con_ssl_server_verify_basic
ECORE_CON_API void ecore_con_ssl_server_verify_basic(Ecore_Con_Server *svr)
Enables hostname-based certificate verification on a server object.
Definition ecore_con_legacy.c:2548
ecore_con_ssl_server_upgrade
ECORE_CON_API Eina_Bool ecore_con_ssl_server_upgrade(Ecore_Con_Server *svr, Ecore_Con_Type ssl_type)
Upgrades a connection to a specified level of encryption.
Definition ecore_con_legacy.c:2590
ecore_con_ssl_server_cafile_add
ECORE_CON_API Eina_Bool ecore_con_ssl_server_cafile_add(Ecore_Con_Server *svr, const char *ca_file)
Adds an SSL CA file for use in ecore_con functions.
Definition ecore_con_legacy.c:2513
ecore_con_ssl_server_verify
ECORE_CON_API void ecore_con_ssl_server_verify(Ecore_Con_Server *svr)
Enables certificate verification on a server object.
Definition ecore_con_legacy.c:2528
ecore_con_server_del
ECORE_CON_API void * ecore_con_server_del(Ecore_Con_Server *svr)
Closes the connection and free the given server.
Definition ecore_con_legacy.c:2302
ecore_con_server_ip_get
ECORE_CON_API const char * ecore_con_server_ip_get(const Ecore_Con_Server *svr)
Gets the IP address of a server that has been connected to.
Definition ecore_con_legacy.c:2398
Ecore_Con_Server
struct _Ecore_Con_Server Ecore_Con_Server
Used to provide legacy API/ABI compatibility with non-Eo applications.
Definition Ecore_Con.h:294
ecore_con_server_connect
ECORE_CON_API Ecore_Con_Server * ecore_con_server_connect(Ecore_Con_Type type, const char *name, int port, const void *data)
Creates a connection to the specified server and return an associated object.
Definition ecore_con_legacy.c:2165
ecore_con_server_flush
ECORE_CON_API void ecore_con_server_flush(Ecore_Con_Server *svr)
Flushes all pending data to the given server.
Definition ecore_con_legacy.c:2412
ecore_con_server_send
ECORE_CON_API int ecore_con_server_send(Ecore_Con_Server *svr, const void *data, int size)
Sends the given data to the given server.
Definition ecore_con_legacy.c:2354
Ecore_Event_Handler_Cb
Eina_Bool(* Ecore_Event_Handler_Cb)(void *data, int type, void *event)
A callback used by the main loop to handle events of a specified type.
Definition Ecore_Common.h:603
ecore_event_handler_add
Ecore_Event_Handler * ecore_event_handler_add(int type, Ecore_Event_Handler_Cb func, const void *data)
Adds an event handler.
Definition ecore_events.c:13
Ecore_Fd_Handler
struct _Ecore_Fd_Handler Ecore_Fd_Handler
A handle for Fd handlers.
Definition Ecore_Common.h:1386
ecore_main_fd_handler_add
Ecore_Fd_Handler * ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, Ecore_Fd_Cb func, const void *data, Ecore_Fd_Cb buf_func, const void *buf_data)
Adds a callback for activity on the given file descriptor.
Definition ecore_main.c:1449
ECORE_FD_READ
@ ECORE_FD_READ
Fd Read mask.
Definition Ecore_Common.h:1394
ECORE_GETOPT_VALUE_NONE
#define ECORE_GETOPT_VALUE_NONE
Definition for options that store a NULL value.
Definition Ecore_Getopt.h:1018
ECORE_GETOPT_VALUE_INT
#define ECORE_GETOPT_VALUE_INT(val)
Definition for options that store a single value in a variable of type int.
Definition Ecore_Getopt.h:955
ECORE_GETOPT_CHOICE
#define ECORE_GETOPT_CHOICE(shortname, longname, help, choices_array)
Definition for filling Ecore_Getopt_Desc table with a true boolean value.
Definition Ecore_Getopt.h:750
ECORE_GETOPT_VALUE_STR
#define ECORE_GETOPT_VALUE_STR(val)
Definition for options that store a single value in a variable of type string.
Definition Ecore_Getopt.h:934
ECORE_GETOPT_STORE_METAVAR_INT
#define ECORE_GETOPT_STORE_METAVAR_INT(shortname, longname, help, metavar)
Definition for filling Ecore_Getopt_Desc table with an option of type int and metavar.
Definition Ecore_Getopt.h:381
ECORE_GETOPT_STORE_METAVAR_STR
#define ECORE_GETOPT_STORE_METAVAR_STR(shortname, longname, help, metavar)
Definition for filling Ecore_Getopt_Desc table with an option of type string and metavar.
Definition Ecore_Getopt.h:348
ECORE_GETOPT_LICENSE
#define ECORE_GETOPT_LICENSE(shortname, longname)
Definition for filling Ecore_Getopt_Desc table with a license action.
Definition Ecore_Getopt.h:892
ECORE_GETOPT_VALUE_BOOL
#define ECORE_GETOPT_VALUE_BOOL(val)
Definition for options that store a single value in a variable of type boolean.
Definition Ecore_Getopt.h:941
ECORE_GETOPT_VERSION
#define ECORE_GETOPT_VERSION(shortname, longname)
Definition for filling Ecore_Getopt_Desc table with a version action.
Definition Ecore_Getopt.h:870
ecore_getopt_parse_positional
EAPI int ecore_getopt_parse_positional(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc, char **argv, int start)
Parses command line positional parameters.
Definition ecore_getopt.c:2096
ecore_getopt_parse
EAPI int ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc, char **argv)
Parses command line parameters.
Definition ecore_getopt.c:2032
ECORE_GETOPT_COPYRIGHT
#define ECORE_GETOPT_COPYRIGHT(shortname, longname)
Definition for filling Ecore_Getopt_Desc table with a copyright action.
Definition Ecore_Getopt.h:881
ECORE_GETOPT_STORE_TRUE
#define ECORE_GETOPT_STORE_TRUE(shortname, longname, help)
Definition for filling Ecore_Getopt_Desc table with a true boolean value.
Definition Ecore_Getopt.h:727
ECORE_GETOPT_HELP
#define ECORE_GETOPT_HELP(shortname, longname)
Definition for filling Ecore_Getopt_Desc table with a help action.
Definition Ecore_Getopt.h:859
ECORE_GETOPT_STORE_FALSE
#define ECORE_GETOPT_STORE_FALSE(shortname, longname, help)
Definition for filling Ecore_Getopt_Desc table with a false boolean value.
Definition Ecore_Getopt.h:738
ECORE_GETOPT_STORE_STR
#define ECORE_GETOPT_STORE_STR(shortname, longname, help)
Definition for macro that fill Ecore_Getopt_Desc table with an option of type string.
Definition Ecore_Getopt.h:249
ECORE_GETOPT_SENTINEL
#define ECORE_GETOPT_SENTINEL
Definition for filling Ecore_Getopt_Desc table with a sentinel to indicate the end of descriptions.
Definition Ecore_Getopt.h:927
ecore_shutdown
EAPI int ecore_shutdown(void)
Shuts down connections, signal handlers sockets etc.
Definition ecore.c:371
ecore_init
EAPI int ecore_init(void)
Sets up connections, signal handlers, sockets etc.
Definition ecore.c:230
ECORE_CALLBACK_RENEW
#define ECORE_CALLBACK_RENEW
Return value to keep a callback.
Definition Ecore_Common.h:153
ecore_main_loop_quit
void ecore_main_loop_quit(void)
Quits the main loop once all the events currently on the queue have been processed.
Definition ecore_main.c:1321
ECORE_CALLBACK_CANCEL
#define ECORE_CALLBACK_CANCEL
Return value to remove a callback.
Definition Ecore_Common.h:152
ecore_main_loop_begin
void ecore_main_loop_begin(void)
Runs the application main loop.
Definition ecore_main.c:1311
eina_file_ls
EINA_API Eina_Iterator * eina_file_ls(const char *dir)
Gets an iterator to list the content of a directory.
Definition eina_file_posix.c:633
eina_iterator_free
EINA_API void eina_iterator_free(Eina_Iterator *iterator)
Frees an iterator.
Definition eina_iterator.c:98
EINA_ITERATOR_FOREACH
#define EINA_ITERATOR_FOREACH(itr, data)
Definition for the macro to iterate over all elements easily.
Definition eina_iterator.h:448
Eina_Iterator
struct _Eina_Iterator Eina_Iterator
Abstract type for iterators.
Definition eina_iterator.h:126
eina_shutdown
EINA_API int eina_shutdown(void)
Shuts down the Eina library.
Definition eina_main.c:379
eina_init
EINA_API int eina_init(void)
Initializes the Eina library.
Definition eina_main.c:291
eina_stringshare_del
EINA_API void eina_stringshare_del(Eina_Stringshare *str)
Notes that the given string has lost an instance.
Definition eina_stringshare.c:533
EINA_TRUE
#define EINA_TRUE
boolean value TRUE (numerical value 1)
Definition eina_types.h:539
EINA_FALSE
#define EINA_FALSE
boolean value FALSE (numerical value 0)
Definition eina_types.h:533
Eina_Bool
unsigned char Eina_Bool
Type to mimic a boolean.
Definition eina_types.h:527
EINA_UNUSED
#define EINA_UNUSED
Used to indicate that a function parameter is purposely unused.
Definition eina_types.h:339
_Ecore_Con_Event_Server_Add::server
Ecore_Con_Server * server
the server that was connected to
Definition Ecore_Con.h:481
_Ecore_Con_Event_Server_Data::size
int size
the length of the data sent
Definition Ecore_Con.h:532
_Ecore_Con_Event_Server_Data::data
void * data
the data that the server sent
Definition Ecore_Con.h:531
_Ecore_Con_Event_Server_Del::server
Ecore_Con_Server * server
the client that was lost
Definition Ecore_Con.h:500
_Ecore_Con_Event_Server_Error::error
char * error
the error string describing what happened
Definition Ecore_Con.h:510
_Ecore_Con_Event_Server_Upgrade::server
Ecore_Con_Server * server
the server that was connected to
Definition Ecore_Con.h:491
_Ecore_Con_Event_Server_Write::size
int size
the length of the data sent
Definition Ecore_Con.h:552