summaryrefslogtreecommitdiff
path: root/src/Makefile_Ecore_Con.am
Commit message (Collapse)AuthorAgeFilesLines
* efl_net: add Efl.Net.Ip_AddressGustavo Sverzut Barbieri2016-12-121-1/+4
| | | | | | | | | | | | | | | | | | | This is a string parser, serializer and asynchronous resolver. It's purpose is to convert to and from the strings we use in our dialers and servers, such as "127.0.0.1:1234" or "[::1]:1234", properties allow to check the family, port, address bytes (slice) and even get a struct sockaddr pointer to use with bind()/connect() in outside code. It will also offer some utilities present in netinet/in.h in an easy to use way, after all IN6_IS_ADDR_LOOPBACK() works one way, while there is no IN_LOOPBACK and comparing with INADDR_LOOPBACK will lead to errors since it's in network order. Last but not least, it will do asynchronous resolve of host and port names using an internal thread and getaddrinfo(). The results are delivered using a Future with an array of objects.
* efl_net: move error COULDNT_RESOLVE_HOST to broader scope.Gustavo Sverzut Barbieri2016-12-121-0/+1
| | | | | This error is shared by Dialer and Server, will also be used by IP resolution.
* ecore_con: Ecore_Con_Server now on top of Efl_Net!devs/barbieri/ecore_con-efl_netGustavo Sverzut Barbieri2016-12-101-10/+5
| | | | | | | | | | | | | | | | | This is a major work and unfortunately couldn't be split into smaller pieces as old code was highly coupled. Ecore_Con_Server is now a wrapper around Efl_Net_Dialer_Simple (ecore_con_server_connect()) and Efl_Net_Server_Simple (ecore_con_server_add()), doing all that the original version did with some fixes so ecore_con_ssl_server_upgrade() and ecore_con_ssl_client_upgrade() are more usable -- see the examples and -t/--type=tcp+ssl. I tried to be bug-compatible, with code annotations where things doesn't make sense. This was based on ecore_con_suite tests and some manual experimenting with the examples, these can be helpful if you find regressions (report/assign to me).
* ecore_con_url: now on top of efl_net_dialer_http.Gustavo Sverzut Barbieri2016-11-291-4/+1
| | | | | | | | | | | | | | Rewrite Ecore_Con_Url as a non-Eo (since it's just legacy) that is built on top of Efl_Net_Dialer_Http. Since there are some legacy behavior we do not want to expose in the new classes, hack around and manipulate the curl_easy_setopt() directly in those cases. This includes the cookies: there is no reason why we should expose independent files for read (COOKIEFILE) and write (COOKIEJAR), real world applications can manipulate the files directly, like copying from a template to a RDWR before using, etc.
* efl_net_{socket,dialer,server}_simple: easy to use, buffered network sockets.Gustavo Sverzut Barbieri2016-11-251-0/+6
| | | | | | | | | | | | | | | | | | | The low level I/O primitives are powerful but adds some complexity to use, for bi-directional streaming communication one ends creating two Efl.Io.Queue and two Efl.Io.Copier to pipe data to socket when it can operate. Then encapsulate the socket using the new Efl.Io.Buffered_Stream, this will allow the socket, be a dialer or a server client, to be operated as a single handle that internally carries about the buffering for you. As one can see in the examples, compared to their "manual" alternatives they are very easy to use, ressembling Ecore_Con_Server/Ecore_Con_Client, but also offers line-based delimiters and the possibility to let the socket to handle queueing for you in case you received partial messages (just do not read/clear/discard the received data).
* efl_net_{control,session}: allow "none" backend.Gustavo Sverzut Barbieri2016-11-181-1/+13
| | | | | | | | | | | | Since connman is specific to linux, on other platforms just compile a dummy "none" backend that will always report online and no other details. This will be used in Windows, MacOS and other platforms that still lack a proper backend. The compile-time infrastructure also allows for networkmanager to be added with ease, simply copy "efl_net*-none.c" or "efl_net*-connman.c" to be a starting point and then add its specifics, adapting configure.ac and Makefile_Ecore_Con.am
* efl_net_session and efl_net_control for ConnManGustavo Sverzut Barbieri2016-11-081-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are objects to allow control of networking devices (efl_net_control) as well as an application to request for connectivity (efl_net_session). They are loosely based on ConnMan.org, which we already use in Enlightenment Window Manager via DBus access with Eldbus. However they do not map 1:1 as the goal was to expose a viable subset of controls but in a simple and general way, thus nome strings were converted to enums, some arrays of strings were converted to bitwise flags, some names were made more general, such as "service" was turned into "access point" so it doesn't generate confusion with other "network services" (ie: http server), or "favorite" that was renamed to "remembered". Some behavior are slightly different (yet able to be implemented on top), such as "Service.MoveBefore" and "MoveAfter" were converted to a numeric "priority", calculated from service's list index, changing the priority will reoder the list and thus generate the MoveBefore and MoveAfter DBus commands. ConnMan was chosen not only because we already use it, but because its DBus API is sane and simple, with the server doing almost all that we need. This is visible in the efl_net_session, which is completely done in the server and do not require any extra work on our side -- aside from talking DBus and converting to Eo, which is a major work :-D NOTE: ConnMan doesn't use FreeDesktop.Org DBus interfaces such as Properties and ObjectManager, thus we cannot use eldbus_model_object. There are two examples added: - efl_net_session_example: monitors the connection available for an application and try to connect. You need a connman compiled with session_policy_local and a configuration file explained in https://github.com/aldebaran/connman/blob/master/doc/session-policy-format.txt to get a connection if nothing is connected. Otherwise it will just monitor the connectivity state. - efl_net_control_example: monitors, plays the agent and configure the network details. It can enable/disable technologies, connect to access points (services) and configure them. It's quite extensive as allows testing all of ConnMan's DBus API except P2P (Peers).
* efl_net_{server,dialer}_ssl: TCP + SSL easy to use.Gustavo Sverzut Barbieri2016-11-011-1/+5
| | | | | | | | | in the previous commit we're manually upgrading an existing TCP socket to SSL. It is desired since some protocols need to negotiate, like STARTTLS and the likes Now we offer 2 classes that does autostart SSL once the socket is ready.
* efl_net_socket_ssl: initial SSL wrapper.Gustavo Sverzut Barbieri2016-10-311-2/+19
| | | | | This is the first step towards SSL connections on top of sockets, with an example on how to upgrade a dialer and a server client using TCP.
* addded efl_net_{socket,dialer,server}_unixGustavo Sverzut Barbieri2016-10-261-1/+12
| | | | | | | | | | | | | | This introduces AF_UNIX server and dialer, these are not available on Windows as in that platform we'll create a custom class for native 'local' communication. In the future we can add a wrapper class Efl.Net.Local that will use the class for each platform, but won't expose its details. For instance, if we ever expose 'credentials' (which I didn't because they are not portable), then it doesn't make sense to try to match that on Windows. The 'Efl.Net.Local' would just stick to the basics: Reader, Writer and Closer APIs.
* efl_net_server_udp: initial UDP server.Gustavo Sverzut Barbieri2016-10-211-1/+5
| | | | | | | | | | | | | | | | | | | | | This is the initial UDP server that works similarly to the TCP one, however under the hood it's widely different since the socket is reused for all "clients", thus needs a new Efl.Net.Server.Udp.Client (Efl.Net.Socket) as Efl.Net.Socket.Udp exposes the fd and options such as 'cork', which would interfere in other clients. The main socket will read the packets and find an existing client to feed it. If no client exists, then it will create one if not overr limit. Since there is no kernel-queuing as done by listen()/accept(), the 'no reject' case will just accept the client anyway. Next commits will improve UDP server handling with some advanced features: - join multicast groups - bind to a specific interface (SO_BINDTODEVICE) - block packets going out of local network (SO_DONTROUTE) - specify priorities (SO_PRIORITY)
* efl_net_dialer_udp: "connect" to an UDP server to send and receive data.Gustavo Sverzut Barbieri2016-10-181-0/+4
| | | | | | | | | | | | | | | | Like existing ecore_con code, this does not use SOCKSv5 UDP proxy. It's kinda cumbersome to add since requires a keep alive TCP connection to the server, a second UDP channel and framing around the original UDP frame. Added UDP_CORK (if present) to match TCP_UDP present in TCP sockets, this allows one to execute multiple write() calls that will result in a single datagram, generated when CORK becomes FALSE again. The efl_io_copier_example.c now accepts this as output. There is no input UDP as there is no way to notify the server of a connection (since such thing doesn't exit), usually servers react after a datagram is received, replying to the source.
* efl_net_dialer_websocket: EFL now does WebSocket!devs/barbieri/websocketGustavo Sverzut Barbieri2016-09-021-0/+2
| | | | | | | | | | | | | | | 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.
* WIP: efl.net: Introduce Efl.Net.Dialer.HttpGustavo Sverzut Barbieri2016-08-221-1/+10
| | | | | | | | 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
* efl.net: socket, server and dialer for TCP.Gustavo Sverzut Barbieri2016-08-221-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* build: clean generated js and lua files manually to avoid problems with ↵Stefan Schmidt2016-06-211-3/+1
| | | | | | | | 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.
* build: split EXTRA_DIST files in src/ off from DISTFILES and handle separatelyStefan Schmidt2016-06-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* ecore-con - simplify down to a single libc resolverCarsten Haitzler (Rasterman)2016-05-241-18/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Efl network: Remove the no longer needed .Base hack.Tom Hacohen2016-05-111-1/+1
|
* build: keep our CLEANFILES tidy to avoid argument list too long during cleanStefan Schmidt2016-03-311-4/+0
| | | | | | | | | | | | | | | | | 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
* ecore_con: changing from Ecore.Con.Base to Efl.Network.Base.Srivardhan Hebbar2016-02-181-1/+1
| | | | | | | | | | | | 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>
* ecore_con: change Ecore.Con.Client to Efl.Network.Client.Srivardhan Hebbar2016-02-121-1/+1
| | | | | | | | | | | | 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>
* ecore_con: changing Ecore.Con.Server to Efl.Network.Server.Srivardhan Hebbar2016-02-051-1/+1
| | | | | | | | | | | | 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>
* ecore_con: from ecore_con_connector to efl_network_connector.Srivardhan Hebbar2016-01-041-1/+1
| | | | | | | | | | | | | | 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>
* efl-js: JavaScript Eolian bindingFelipe Magno de Almeida2015-12-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | 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
* ecore_con: fix another case where files have been moved and sitcheck benn brokenStefan Schmidt2015-11-121-1/+2
| | | | | | | This time the move of dns to static_libs in 4f24deac448c648d0b514acefd8bbb8721c9fe04 broke distcheck as the header file was never shipped with the tarball. I would really appreciate if author and reviewer would pay more attention.
* ecore_con: Moving dns.c and dns.h to static_libs.Srivardhan Hebbar2015-11-101-1/+7
| | | | | | | | | | | | 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
* ecore_con: add http_parser static lib.Srivardhan Hebbar2015-11-091-1/+11
| | | | | | | | | | | | | | | 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>
* ecore-con-url- split out the curl dleopener and resolver and headersCarsten Haitzler (Rasterman)2015-09-031-0/+2
| | | | | | 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
* Ecore_Con: Fix make distcheckJean-Philippe Andre2015-06-231-1/+3
|
* ecore_con: eoifying ecore_con_eet.Srivardhan Hebbar2015-06-221-0/+3
| | | | | | | | | | | | | | | | 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>
* autotools: ecore_con_legacy.c is not compiled directly, but must be in dist ↵Daniel Kolesa2015-05-231-0/+2
| | | | tarball
* ecore_con: changed Ecore_Con_Url to Efl_Network_Url.Srivardhan Hebbar2015-05-181-1/+1
| | | | | | | | | | | | | | 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>
* Revert "autotools: enable make check per individual modules."Stefan Schmidt2015-05-071-6/+0
| | | | | | | This reverts commit 35119e7bfdc7c13c2041293f3d0b2ebe1fb7c313. Reverted to bring make check back in a working state. Also the way we want to handle a more modular testing needs discussion.
* autotools: enable make check per individual modules.kabeer khan2015-05-071-0/+6
| | | | | | | | 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>
* ecore_con: add test cases for ecore_con_eet.Srivardhan Hebbar2015-04-151-0/+1
| | | | | | | | | | | | | | | 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>
* ecore_con: Make sure the server.key and pem are distributed in the tarballStefan Schmidt2015-04-071-4/+4
| | | | | Pull them out of the if EFL_ENABLE_TESTS test as we need them to be put into the tarball in all cases.
* ecore_con: Split ecore_con test suite from ecore.Srivardhan Hebbar2015-04-061-0/+35
| | | | | | | | | | | | | | | 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
* elua/autotools: generate .eo.lua files out of all eo files at build timeDaniel Kolesa2014-10-061-0/+13
| | | | | 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.
* Build system: Clean up the generation of sources from eolian.Tom Hacohen2014-10-021-23/+18
| | | | | | 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.
* Ecore con: Add Connector class (the connecting variant of server).Tom Hacohen2014-09-011-0/+4
| | | | | This change also consists of cleaning up the server class and adding a constructor and a finalizer to it.
* Ecore con url: Migrate to eo.Tom Hacohen2014-09-011-3/+7
|
* revert all recent ecore-con related eo changes. completely broken.Mike Blumenkrantz2014-08-301-11/+3
| | | | | | please test things before committing. reverts all changes since and including f6156c9a6234237757b61960c690e8d55779e764
* Ecore con: Add Connector class (the connecting variant of server).Tom Hacohen2014-08-281-0/+4
| | | | | This change also consists of cleaning up the server class and adding a constructor and a finalizer to it.
* Ecore con url: Migrate to eo.Tom Hacohen2014-08-281-3/+7
|
* Ecore con: Rename to Ecore.Con.Base for the C++ bindings.Tom Hacohen2014-08-221-4/+4
|
* Ecore con server: Migrate to eo.Tom Hacohen2014-08-221-3/+7
|
* Ecore con client: Migrate to eo.Tom Hacohen2014-08-221-4/+11
|
* Ecore con: Start migration to eo.Tom Hacohen2014-08-221-0/+17
|
* Win32: Add configuration to cross-compileShinwoo Kim2014-05-201-1/+1
| | | | Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>