Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/bin
Modified Files:
Tag: SPLIT
Makefile.am ecore_test.c
Log Message:
ecore_con module is there... what does this do? con is short for.. CONNECT!
:)
ecore_con is a generic ipc/communications/socket/event/loop/buffering layer. it
uses the ecore event loop and infrastructure to get data from a socket and
send it, handle connections of clients etc. it handles buffering all data so if
you send mroe data than your os socket buffers will allow your pgoram does
NOT block waiting for the os to flush its buffers... nor does it fail. ecore
just buffers it for you in ram and flushes it whenever the socket is ready
for more data. (basically what xlib does internally). this means you can
happily send MASSES of data and the time it takes is a memcpy(). the rest
gets quietly flushed in the background. Recieving data is done on demand when
it arrives. It makes it EASY for a program to advertise a socket serivce -
setup is trivial. a program just sets up a server on a named service and
ecore does the rest for you. this will make it brain-dead for ecore using
programs to talk to eachother later on. this is structured to be able to add
tcp/ip in with no api changes (which i will add later). this will let ecore
apps talk over networks... in fact ecore will let you write arbitary
client/server programs talking any protocol, new or existing, as long as its
tcp :) you could write a webserver using it, or a ftp server or an ftp
client... take your pick...
NB: this is NOT complete. work is underway on it. it's just up and running
now with some basics working.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/bin/Attic/Makefile.am,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -u -3 -r1.1.2.11 -r1.1.2.12
--- Makefile.am 17 Feb 2003 08:33:22 -0000 1.1.2.11
+++ Makefile.am 12 Mar 2003 23:53:32 -0000 1.1.2.12
@@ -1,43 +1,42 @@
## Process this file with automake to produce Makefile.in
if BUILD_ECORE_EVAS
-ECORE_EVAS_INC = -I$(top_srcdir)/src/lib/ecore_evas
ECORE_EVAS_LIB = $(top_builddir)/src/lib/ecore_evas/libecore_evas.la
else
-ECORE_EVAS_INC =
ECORE_EVAS_LIB =
endif
if BUILD_ECORE_X
-ECORE_X_INC = -I$(top_srcdir)/src/lib/ecore_x
ECORE_X_LIB = $(top_builddir)/src/lib/ecore_x/libecore_x.la
else
-ECORE_X_INC =
ECORE_X_LIB =
endif
if BUILD_ECORE_FB
-ECORE_FB_INC = -I$(top_srcdir)/src/lib/ecore_fb
ECORE_FB_LIB = $(top_builddir)/src/lib/ecore_fb/libecore_fb.la
else
-ECORE_FB_INC =
ECORE_FB_LIB =
endif
if BUILD_ECORE_JOB
-ECORE_JOB_INC = -I$(top_srcdir)/src/lib/ecore_job
ECORE_JOB_LIB = $(top_builddir)/src/lib/ecore_job/libecore_job.la
else
-ECORE_JOB_INC =
ECORE_JOB_LIB =
endif
+if BUILD_ECORE_CON
+ECORE_CON_LIB = $(top_builddir)/src/lib/ecore_con/libecore_con.la
+else
+ECORE_CON_LIB =
+endif
+
INCLUDES = \
-I$(top_srcdir)/src/lib/ecore \
-$(ECORE_JOB_INC) \
-$(ECORE_FB_INC) \
-$(ECORE_X_INC) \
-$(ECORE_EVAS_INC) \
+-I$(top_srcdir)/src/lib/ecore_evas \
+-I$(top_srcdir)/src/lib/ecore_x \
+-I$(top_srcdir)/src/lib/ecore_fb \
+-I$(top_srcdir)/src/lib/ecore_job \
+-I$(top_srcdir)/src/lib/ecore_con \
@evas_cflags@ \
@x_cflags@
@@ -54,6 +53,7 @@
$(ECORE_FB_LIB) \
$(ECORE_X_LIB) \
$(ECORE_EVAS_LIB) \
+$(ECORE_CON_LIB) \
-lm
ecore_test_LDFLAGS =
@@ -67,7 +67,8 @@
$(ECORE_JOB_LIB) \
$(ECORE_FB_LIB) \
$(ECORE_X_LIB) \
-$(ECORE_EVAS_LIB)
+$(ECORE_EVAS_LIB) \
+$(ECORE_CON_LIB)
ecore_evas_test_SOURCES = \
ecore_evas_test.c \
@@ -82,6 +83,7 @@
$(ECORE_FB_LIB) \
$(ECORE_X_LIB) \
$(ECORE_EVAS_LIB) \
+$(ECORE_CON_LIB) \
-lm
ecore_evas_test_LDFLAGS =
@@ -95,4 +97,5 @@
$(ECORE_JOB_LIB) \
$(ECORE_FB_LIB) \
$(ECORE_X_LIB) \
-$(ECORE_EVAS_LIB)
+$(ECORE_EVAS_LIB) \
+$(ECORE_CON_LIB)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/bin/Attic/ecore_test.c,v
retrieving revision 1.1.2.29
retrieving revision 1.1.2.30
diff -u -3 -r1.1.2.29 -r1.1.2.30
--- ecore_test.c 15 Feb 2003 14:54:28 -0000 1.1.2.29
+++ ecore_test.c 12 Mar 2003 23:53:33 -0000 1.1.2.30
@@ -12,6 +12,9 @@
#ifdef BUILD_ECORE_EVAS
#include "Ecore_Evas.h"
#endif
+#ifdef BUILD_ECORE_CON
+#include "Ecore_Con.h"
+#endif
#include <math.h>
@@ -72,7 +75,7 @@
setup_ecore_test(void)
{
ecore_idle_enterer_add(idle_enterer, NULL);
- ecore_idler_add(idler, NULL);
+/* ecore_idler_add(idler, NULL); */
ecore_timer_add(1.0, timer, NULL);
}
@@ -459,14 +462,37 @@
/* tell ecore what our arguments are */
ecore_app_args_set(argc, argv);
-#if 0
+#if 1
/* setup to test ecore module basics */
setup_ecore_test();
#endif
+
+#ifdef BUILD_ECORE_CON
+ /* init ecore_con */
+ ecore_con_init();
+ {
+ Ecore_Con_Server *server;
+
+ server = ecore_con_server_add(ECORE_CON_LOCAL_USER, "ecore_test", 0, NULL);
+ printf("server handle: %p\n", server);
+ }
+ {
+ Ecore_Con_Server *server;
+
+ server = ecore_con_server_connect(ECORE_CON_LOCAL_USER, "ecore_test", 0, NULL);
+ printf("connect to server: %p\n", server);
+ if (server)
+ {
+ char data[160 * 1024];
+
+ ecore_con_server_send(server, data, 160 * 1024);
+ }
+ }
+#endif
#ifdef BUILD_ECORE_EVAS
/* init ecore_evas */
- if (!ecore_evas_init()) return -1;
+/* if (!ecore_evas_init()) return -1; */
#endif
/* setup a callback to handle a systsme signal to quit */
@@ -480,7 +506,7 @@
#ifdef BUILD_ECORE_EVAS
/* setup to test ecore_evas module */
- if (!setup_ecore_evas_test()) return -1;
+/* if (!setup_ecore_evas_test()) return -1; */
#endif
/* run the main loop */
@@ -490,6 +516,10 @@
/* shut down ecore_evas */
ecore_evas_shutdown();
#endif
+#ifdef BUILD_ECORE_CON
+ /* shut down ecore_con */
+ ecore_con_shutdown();
+#endif
/* shut down ecore */
ecore_shutdown();
return 0;
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs