Commit Graph

49 Commits

Author SHA1 Message Date
Gustavo Sverzut Barbieri e12afd772c efl_net_dialer_websocket: EFL now does WebSocket!
The Efl.Net.Dialer.Websocket is just like other Efl.Net.Dialers: you
can dial, you can close, monitor connected/address resolved and so
on. And you can use WebSocket primitives and events such as
text_send(), binary_send(), ping() and close_request() (since
WebSockets use a close process where you should state a close
reason). See efl_net_dialer_websocket_example.c

Even if WebSocket is a message-based protocol (like "packets" from
UDP), you can use efl_net_dialer_websocket_streaming_mode_set() to
tell it to handle text or binary messages as a stream. Then all the
Efl.Io.Reader and Efl.Io.Writer APIs work as expected, see
efl_io_copier_example.c updates.
2016-09-02 00:08:50 -03:00
Gustavo Sverzut Barbieri b791c79ca0 WIP: efl.net: Introduce Efl.Net.Dialer.Http
This class implements the Efl.Net.Dialer interface using libcurl to
perform HTTP requests. That means it's an Efl.Net.Dialer,
Efl.Net.Socket, Efl.Io.Reader, Efl.Io.Writer and Efl.Io.Closer, thus
being usable with Efl.Io.Copier as demonstrated in the
efl_io_copier_example.c
2016-08-22 18:25:15 -03:00
Gustavo Sverzut Barbieri e7df1a7483 efl.net: socket, server and dialer for TCP.
Efl.Net.Server defines how to accept new connections, doing the
bind(), listen() and accept() for protocols such as TCP.

Efl.Net.Dialer defines to to reach a server.

Both are based on Efl.Net.Socket as communication interface that is
based on Efl.Io.Reader, Efl.Io.Writer and Efl.Io.Closer, thus being
usable with code such as Efl.Io.Copier.

The Server will emit an event "client,add" with the established
Socket, which is a child and can be closed by both the server or the
user.

The Dialer extends the Socket and allows for creating one given an
address, that will be resolved and connected.

TCP is the initial implementation so we an validate the
interfaces. UDP, Unix-Local and SSL will come later as derivate
classes.

The examples are documented and should cover the basic principles:

 - efl_io_copier_example can accept "tcp://IP:PORT" and will work as a
   "netcat", can send data from socket, file or stdin to a socket,
   file, stdout or stderr.

 - efl_net_server_example listens for connections and can either reply
   "Hello World!" and take some data or work as an echo-server,
   looping back all received data to the user.

More complex interactions that require a "chat" between client and
server will be covered with new classes later, such as a queue that
empties itself once data is read.
2016-08-22 18:25:14 -03:00
Stefan Schmidt fffe6dc7b8 build: clean generated js and lua files manually to avoid problems with CLEANFILES
We hit another argument too long error with CLEANFILES. Moving the generated
files for js and lua into separated variables and cleaning them manually fixes
the issue.
2016-06-21 17:07:13 +02:00
Stefan Schmidt 93eadd76d6 build: split EXTRA_DIST files in src/ off from DISTFILES and handle separately
This is again to avoid the "Argument list too long" error we are hitting more and
more now. Given we just merged elementary, emotion generic players, evas generic
loaders and elm_code it is not surprising we are hitting it again.

This time the number of files being hold in DISTFILES has just grown to big so a
make dist was no longer possible. If one looks at what the DISTFILES variable
from automake holds you can image it grows a lot with all the source files plus
generated files we have in tree now.

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)

To cut off a big chunk but still keep all the other automagic in place for
SOURCE files I went and renamed the EXTRA_DIST in src/ to EXTRA_DIST2 and handle
the files in a dist-hook now.

Another thing to note here is that this also only happens as we have the one big
Makefile with includes. If we go back to per directory Makefiles this problem
should vanish as well. In any case we need a solution for 1.18 now and this is
what I have to offer. If you have a cleaner solution in mind feel welcome to
test it out and if everything we need keeps working (make, make examples,
make check, make benchmark, make dist and make distcheck) go ahead.
2016-06-10 13:04:18 +02:00
Carsten Haitzler 1eba9d9de0 ecore-con - simplify down to a single libc resolver
Summary:
this removes the cares/ares based resolver and the compiled-in dns.c
resolver, modified the getaddrinfo based resolver to use threads not
forking (almost halving its size) and now makes that the only resolver
we have. getaddrinfo handles ipv6 and ipv4 (according to docs). this
simplifies code paths, drops code size of the efl tree by about 11k
lines of code, makes it easier to test and more robust to future
changes with ip resolving as it now just relies on libc. we won't have
coverity complaints on dns.c imported code anymore to fix and don't
have tokeep up with bugfixes/security from the upstream imported code.
this means we use a single resolver on all platforms (windows, mac,
linux) as opposed to before where cares was used for windows, and
dns.c on linux/mac. oh and the forking original was broken since our
move to eo too. so it couldnt even compile if enabled, letalone work.

so fix bug with missing /etc/resolv.conf that dns.c couldn't cope
with, fix testability, fix maintainability and reduce efl codebase size.

this fixes T3668

@fix
@improve

Subscribers: cedric, seoz, jpeg

Maniphest Tasks: T3668

Differential Revision: https://phab.enlightenment.org/D3971
2016-05-24 09:20:49 +09:00
Tom Hacohen 70b5f3875e Efl network: Remove the no longer needed .Base hack. 2016-05-11 13:00:57 +01:00
Stefan Schmidt 0a03e63350 build: keep our CLEANFILES tidy to avoid argument list too long during clean
We have been putting the generated eo files and BUILT_SOURCES into CLEANFILES
several times. So far this have not been a real problem but with the elm merge
and more and more eo files showing up this did explode recently.

During make distcheck a lot of files kept being around and make complained about
them. It took some digging to find the arguments list to long error. If you want
details on this great limitation have a look here:
http://www.linuxjournal.com/article/6060

In our case we have been lucky enough that we just appened many files over and
over again. Not doing that solves the issue for now. My testing showed no
problems but if I missed something let me know.

Fixes T3386
2016-03-31 16:29:32 +02:00
Srivardhan Hebbar 865624dab0 ecore_con: changing from Ecore.Con.Base to Efl.Network.Base.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3696

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-02-18 11:25:21 -08:00
Srivardhan Hebbar b1e1186b8e ecore_con: change Ecore.Con.Client to Efl.Network.Client.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3663

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-02-12 21:25:55 +01:00
Srivardhan Hebbar fca9ff1322 ecore_con: changing Ecore.Con.Server to Efl.Network.Server.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3549

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-02-05 08:10:52 +01:00
Srivardhan Hebbar dc56052150 ecore_con: from ecore_con_connector to efl_network_connector.
Summary:
Changed ecore_con_connector.eo to efl_network_connector.eo as part of
migrating to efl_network.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3427

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 12:35:41 -08:00
Felipe Magno de Almeida a3db1dddd3 efl-js: JavaScript Eolian binding
To configure efl sources with bindings to use in nodejs add ––with-js=nodejs in configure flags to generate node files

$ configure --with-js=nodejs

and compile normally with:

$ make
$ make install

To use, you have to require efl:

efl = require('efl')

The bindings is divided in two parts: generated and manually
written. The generation uses the Eolian library for parsing Eo files
and generate C++ code that is compiled against V8 interpreter library
to create a efl.node file that can be required in a node.js instance.

@feature
2015-12-23 23:59:40 -02:00
Stefan Schmidt 2c8da23ed7 ecore_con: fix another case where files have been moved and sitcheck benn broken
This time the move of dns to static_libs in
4f24deac44 broke distcheck as the header file was
never shipped with the tarball. I would really appreciate if author and reviewer
would pay more attention.
2015-11-12 15:11:50 +01:00
Srivardhan Hebbar 4f24deac44 ecore_con: Moving dns.c and dns.h to static_libs.
Summary:
Took the license file from https://github.com/wahern/dns
The dns.c and dns.h are taken from here.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Differential Revision: https://phab.enlightenment.org/D3314
2015-11-10 14:10:02 -08:00
Srivardhan Hebbar e5a9c7844f ecore_con: add http_parser static lib.
Summary:
This lib would be used in efl_network_websocket.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Differential Revision: https://phab.enlightenment.org/D3244

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:52:15 -08:00
Carsten Haitzler 7eba161414 ecore-con-url- split out the curl dleopener and resolver and headers
this splits out out "manual" dlopen (eina_module_load) of curl into
its own .c file and special header out of ecore_con_url.c to tidy up
that code a bit and isolate our curl magic loading/handling
2015-09-03 12:22:01 +09:00
Jean-Philippe Andre 122b242646 Ecore_Con: Fix make distcheck 2015-06-23 15:18:24 +09:00
Srivardhan Hebbar 12257053a0 ecore_con: eoifying ecore_con_eet.
Summary:
This is still work in progress. I've added new file for temporary
purpose. Idea is to first eoify everything then change its namespace properly.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2602

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-22 18:55:57 +02:00
Daniel Kolesa 0eab944b15 autotools: ecore_con_legacy.c is not compiled directly, but must be in dist tarball 2015-05-23 01:20:46 +01:00
Srivardhan Hebbar 183cef932e ecore_con: changed Ecore_Con_Url to Efl_Network_Url.
Summary: This is just the beginning. I tried for one class to check.
Tell me if this is fine, I'll change in other classes also. The goal
is to simplify and make our API clearer to understand to new comers.

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2468

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-18 11:36:16 +02:00
Stefan Schmidt d48c5accea Revert "autotools: enable make check per individual modules."
This reverts commit 35119e7bfd.

Reverted to bring make check back in a working state. Also the way we
want to handle a more modular testing needs discussion.
2015-05-07 20:50:56 +02:00
kabeer khan 35119e7bfd autotools: enable make check per individual modules.
Currently make check runs tests of whole EFL.Enabled running
of tests of individual modules by make check-<modulename>

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:07 +02:00
Srivardhan Hebbar 3d697254b0 ecore_con: add test cases for ecore_con_eet.
Summary:
Added test case for ecore_con_eet.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2347

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-15 14:50:06 +02:00
Stefan Schmidt 079fcf29a3 ecore_con: Make sure the server.key and pem are distributed in the tarball
Pull them out of the if EFL_ENABLE_TESTS test as we need them to be put into
the tarball in all cases.
2015-04-07 13:19:34 +02:00
Srivardhan Hebbar 4b0e879591 ecore_con: Split ecore_con test suite from ecore.
Summary:
Have created ecore_con test suite.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, Sergeant_Whitespace, stefan_schmidt

Subscribers: stefan_schmidt, Sergeant_Whitespace, cedric

Maniphest Tasks: T2235

Differential Revision: https://phab.enlightenment.org/D2269
2015-04-06 16:37:53 +02:00
Daniel Kolesa f33101ea8c elua/autotools: generate .eo.lua files out of all eo files at build time
Also change the generator a bit so that it doesn't rely on lib name information
and fix the runtime to properly source lua files within tree.
2014-10-06 13:28:09 +01:00
Tom Hacohen 23143148f1 Build system: Clean up the generation of sources from eolian.
This cleans up a lot of the build system. This makes everything
consistent, clean, less redundant and also fixes the issue of make clean
not cleaning up generated files.
2014-10-02 16:54:08 +01:00
Tom Hacohen 0c9a1d8a99 Ecore con: Add Connector class (the connecting variant of server).
This change also consists of cleaning up the server class and adding a
constructor and a finalizer to it.
2014-09-01 12:35:22 +01:00
Tom Hacohen a58c1b6c97 Ecore con url: Migrate to eo. 2014-09-01 11:12:17 +01:00
Mike Blumenkrantz 7b0db79c2d revert all recent ecore-con related eo changes. completely broken.
please test things before committing.

reverts all changes since and including f6156c9a62
2014-08-30 08:12:54 -04:00
Tom Hacohen bba7ac87f1 Ecore con: Add Connector class (the connecting variant of server).
This change also consists of cleaning up the server class and adding a
constructor and a finalizer to it.
2014-08-28 14:31:17 +01:00
Tom Hacohen f6156c9a62 Ecore con url: Migrate to eo. 2014-08-28 11:52:38 +01:00
Tom Hacohen 974e3afabc Ecore con: Rename to Ecore.Con.Base for the C++ bindings. 2014-08-22 17:37:56 +01:00
Tom Hacohen d72f809fb8 Ecore con server: Migrate to eo. 2014-08-22 17:37:56 +01:00
Tom Hacohen d9b5f192d4 Ecore con client: Migrate to eo. 2014-08-22 17:11:54 +01:00
Tom Hacohen 218e76fd30 Ecore con: Start migration to eo. 2014-08-22 17:00:49 +01:00
Shinwoo Kim 42e049fe86 Win32: Add configuration to cross-compile
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2014-05-20 15:16:43 +09:00
Carsten Haitzler daac3fb794 add a global Efl_Config.h for everyone.
* ned to replicate changes in other .pc.in files
* need to replicate changes in other E*.h installed header files
2013-04-24 23:43:33 +09:00
Gustavo Sverzut Barbieri cf1699fe22 each module install headers in their own directory.
SVN revision: 82895
2013-01-16 19:28:30 +00:00
Gustavo Sverzut Barbieri b1bc5aeb24 efl: simplify automake.
Instead of -I$(top_srcdir)... -I$(top_builddir)... and then do it for
the .la, use the EFL_ macros to generate the contents to be used in
automake files.

There is a nasty bit that libtool will parse Makefile*.am and will not
get _DEPENDENCIES from _LIBADD and _LDADD if these are in
@REPLACEMENT@. To solve this we must explicitly set _DEPENDENCIES. The
contents of this is almost the same as _LIBADD or _LDADD with the
"_INTERNAL_" replacement name.

I hope the code will be result will be shorter and consistent as there
is less places to change when we add/remove dependencies.

Statistics are quite impressive (diffstat):
{{{
37 files changed, 663 insertions(+), 1599 deletions(-)
}}}



SVN revision: 82785
2013-01-14 22:36:23 +00:00
Gustavo Sverzut Barbieri df1b3d30c4 efl: refactor CFLAGS, LIBS, LIBADD and LDADD usage.
- remove EFL_LIBS and EFL_CFLAGS, use per-lib values that inherit
   from EFL (general)

 - add NAME_LDFLAGS and EFL_LDFLAGS for linker flags.

 - LDADD (binaries) now use NAME_LDFLAGS instead of NAME_LIBS, as they
   link to libname.la and that will pull in the libtool dependencies



SVN revision: 81915
2012-12-31 00:46:14 +00:00
Gustavo Sverzut Barbieri 493f9a9ff9 efl: unify LDFLAGS for LTLIBRARIES
SVN revision: 81911
2012-12-30 22:15:29 +00:00
Gustavo Sverzut Barbieri cd3d6653af efl: move -lm to configure.ac variables.
EFL_ADD_LIBS() will add to requirements_libs_NAME and that will end
into NAME_LIBS.



SVN revision: 81910
2012-12-30 21:52:34 +00:00
Gustavo Sverzut Barbieri b57e46b9b9 efl: simplify linkage/usage of evil on windows.
instead of spreading it all around, just define 2 AC_SUBST() that will
do the work.



SVN revision: 81477
2012-12-20 19:25:51 +00:00
Vincent Torri ef2ca5b931 cleaning: remove unneeded $(top_builddir)
SVN revision: 81324
2012-12-19 07:17:32 +00:00
Carsten Haitzler 7470edfa5a sorry vincent. i know you dont like thus, but with this commit efl
tree simply is broken and doesnt compile. error here:

...
src/Makefile_Evas.am:1809: unterminated conditionals: HAVE_WINDOWS_TRUE
src/Makefile.am:24:   src/Makefile_Evas.am' included from here
src/Makefile.am:128: unterminated conditionals: HAVE_WINDOWS_TRUE
src/Makefile.am: installing ./depcomp'
automake: ####################
automake: ## Internal Error ##
automake: ####################
automake: undefined condition TRUE' for RECURSIVE_TARGETS'
automake: RECURSIVE_TARGETS:
automake:   {
automake:     HAVE_WINDOWS => {
automake:       type: +=
automake:       where: /usr/share/automake-1.11/am/texinfos.am:
automake:       comment:
automake:       value: dvi-recursive html-recursive info-recursive
pdf-recursive ps-recursive \
automake:   install-dvi-recursive \
automake:   install-html-recursive \
automake:   install-info-recursive \
automake:   install-pdf-recursive \
automake:   install-ps-recursive all-recursive check-recursive
installcheck-recursive
automake:       owner: Automake
automake:     }
automake:   }
automake:
automake: Please contact <bug-automake@gnu.org>.
 at /usr/share/automake-1.11/Automake/Channels.pm line 657
         Automake::Channels::msg('automake', '', 'undefined condition
TRUE\' for RECURSIVE_TARGETS\'\x{a}RECURSIV...') called at
/usr/share/automake-1.11/Automake/ChannelDefs.pm line 208
        Automake::ChannelDefs::prog_error('undefined condition TRUE\'
for RECURSIVE_TARGETS\'\x{a}RECURSIV...') called at
/usr/share/automake-1.11/Automake/Item.pm line 94
        Automake::Item::rdef('Automake::Variable=HASH(0x38cbe20)',
'Automake::Condition=HASH(0x2832a48)') called at /usr/bin/automake
line 4102
        Automake::handle_subdirs() called at /usr/bin/automake line 8305
                Automake::generate_makefile('src/Makefile.am',
'src/Makefile.in') called at /usr/bin/automake line 8602
        Automake::handle_makefile('src/Makefile.in') called at
/usr/bin/automake line 8616
        Automake::handle_makefiles_serial() called at
/usr/bin/automake line 8769
autoreconf: automake failed with exit status: 255
...

i looked at the HAVE_WINDOWS if's and it seems fine to me - i couldnt
find what was missing, so i had to resort to a revert instead of fix :(
sorry :(



SVN revision: 81267
2012-12-18 15:41:06 +00:00
Vincent Torri 7b944729bb no need to search headers in builddir
SVN revision: 81258
2012-12-18 15:11:51 +00:00
Vincent Torri 7d6010b12c merge: add escape ecore, fix several bugs
SVN revision: 79995
2012-12-02 22:35:45 +00:00