Shows how to setup a simple client that connects to a server and sends a "hello" string to it. See the complete example description at Ecore_Con - Creating a client
#include <stdio.h>
#include <Ecore.h>
#include <Ecore_Con.h>
struct _Server
{
   int sdata;
};
{
   char welcome[] = "hello! - sent from the client";
   struct _Server *server = malloc(sizeof(*server));
   server->sdata = 0;
   printf("Server with ip %s, name %s, port %d, connected = %d!\n",
}
{
     {
        printf("Failed to establish connection to the server.\nExiting.\n");
     }
   if (server)
     {
        printf("Total data received from this server: %d\n", server->sdata);
        free(server);
     }
}
{
   char fmt[128];
   snprintf(fmt, sizeof(fmt),
            "Received %i bytes from server:\n"
            ">>>>>\n"
            "%%.%is\n"
            ">>>>>\n",
   server->sdata += ev->
size;
}
int
main(int argc, const char *argv[])
{
   const char *address;
   int port = 8080;
   if (argc < 2)
     {
        printf("wrong usage. Command syntax is:\n");
        printf("\tecore_con_client_simple_example <address> [port]\n");
        exit(1);
     }
   address = argv[1];
   if (argc > 2)
     port = atoi(argv[2]);
     {
        printf("could not connect to the server: %s, port %d.\n",
               address, port);
        exit(2);
     }
   
   
   
   
   return 0;
}