aboutsummaryrefslogtreecommitdiffstats
path: root/reference
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2018-01-04 16:40:14 +0000
committerAndy Williams <andy@andywilliams.me>2018-01-04 16:40:14 +0000
commit5c4053942e4345890890713cfda9179dc95bee20 (patch)
tree23dfe21a4a314af0af4b12590586233483d7e724 /reference
parentSimplify focus example and add Meson (diff)
downloadexamples-5c4053942e4345890890713cfda9179dc95bee20.tar.gz
net: Don't use ecore methods
Diffstat (limited to 'reference')
-rw-r--r--reference/c/net/src/net_io.c6
-rw-r--r--reference/c/net/src/net_io_buffered.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/reference/c/net/src/net_io.c b/reference/c/net/src/net_io.c
index 1421d09b..8475d4b8 100644
--- a/reference/c/net/src/net_io.c
+++ b/reference/c/net/src/net_io.c
@@ -137,7 +137,7 @@ EFL_CALLBACKS_ARRAY_DEFINE(copier_cbs,
{ EFL_IO_COPIER_EVENT_ERROR, _copier_error });
EAPI_MAIN void
-efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
+efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
{
char *address = "example.com:80";
unsigned long buffer_limit = 128;
@@ -192,9 +192,9 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
/*
* some objects such as the Efl.Io.Copier and Efl.Net.Dialer.Tcp
* depend on main loop, thus their parent must be a loop
- * provider. We use the main loop itself.
+ * provider. We use the loop passed to our main method.
*/
- loop = ecore_main_loop_get();
+ loop = ev->object;
/* The TCP client to use to send/receive network data */
_dialer = efl_add(EFL_NET_DIALER_TCP_CLASS, loop,
diff --git a/reference/c/net/src/net_io_buffered.c b/reference/c/net/src/net_io_buffered.c
index 14e841a5..a3aa2f89 100644
--- a/reference/c/net/src/net_io_buffered.c
+++ b/reference/c/net/src/net_io_buffered.c
@@ -118,7 +118,7 @@ EFL_CALLBACKS_ARRAY_DEFINE(stream_cbs,
{ EFL_IO_BUFFERED_STREAM_EVENT_ERROR, _stream_error });
EAPI_MAIN void
-efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
+efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
{
char *address = "example.com:80";
unsigned long buffer_limit = 128;
@@ -131,9 +131,9 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
/*
* some objects such as the Efl.Io.Copier and Efl.Net.Dialer.Tcp
* depend on main loop, thus their parent must be a loop
- * provider. We use the main loop itself.
+ * provider. We use the loop passed to our main method.
*/
- loop = ecore_main_loop_get();
+ loop = ev->object;
/* The TCP client to use to send/receive network data */
_dialer = efl_add(EFL_NET_DIALER_TCP_CLASS, loop,