Shows how to write a simple client that connects to the example server.
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <Ecore.h>
#include <Ecore_Con.h>
#ifdef HAVE_GNUTLS
#include <gnutls/gnutls.h>
static void
tls_log_func(int level, const char *str)
{
fprintf(stderr, "|<%d>| %s", level, str);
}
#endif
{
}
{
}
{
char fmt[128];
snprintf(fmt, sizeof(fmt),
"Received %i bytes from server:\n"
">>>>>\n"
"%%.%is\n"
">>>>>\n",
}
int
main()
{
Ecore_Con_Server *svr;
const char *ca;
#ifdef HAVE_GNUTLS
gnutls_global_set_log_level(9);
gnutls_global_set_log_function(tls_log_func);
#endif
exit(1);
exit(1);
{
printf("Could not load CA: %s!\n", ca);
}
}