2016-05-11 05:00:57 -07:00
|
|
|
#include "efl_network.eo.h"
|
2016-02-04 23:09:53 -08:00
|
|
|
#include "efl_network_server.eo.h"
|
2016-01-04 12:35:37 -08:00
|
|
|
#include "efl_network_connector.eo.h"
|
2016-02-12 12:02:01 -08:00
|
|
|
#include "efl_network_client.eo.h"
|
2015-05-18 02:36:13 -07:00
|
|
|
#include "efl_network_url.eo.h"
|
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-17 21:53:16 -07:00
|
|
|
|
|
|
|
#include "efl_net_socket.eo.h"
|
|
|
|
#include "efl_net_dialer.eo.h"
|
|
|
|
#include "efl_net_server.eo.h"
|
|
|
|
|
|
|
|
#include "efl_net_socket_fd.eo.h"
|
|
|
|
#include "efl_net_server_fd.eo.h"
|
|
|
|
|
|
|
|
#include "efl_net_socket_tcp.eo.h"
|
|
|
|
#include "efl_net_dialer_tcp.eo.h"
|
|
|
|
#include "efl_net_server_tcp.eo.h"
|
2016-08-19 20:55:26 -07:00
|
|
|
|
|
|
|
#include "efl_net_http_types.eot.h"
|
2016-09-09 16:09:51 -07:00
|
|
|
|
|
|
|
/* TODO: should be generated from 'var Efl.Net.Dialer.Error.*' */
|
|
|
|
extern Eina_Error EFL_NET_DIALER_ERROR_COULDNT_CONNECT;
|
|
|
|
extern Eina_Error EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_PROXY;
|
|
|
|
extern Eina_Error EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST;
|
|
|
|
|
2016-08-19 20:55:26 -07:00
|
|
|
/* TODO: should be generated from 'var Efl.Net.Http.Error.*' */
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_BAD_CONTENT_ENCODING;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_BAD_DOWNLOAD_RESUME;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_BAD_FUNCTION_ARGUMENT;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_CHUNK_FAILED;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_CONV_FAILED;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_CONV_REQD;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_FAILED_INIT;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_FILE_COULDNT_READ_FILE;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_FILESIZE_EXCEEDED;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_FUNCTION_NOT_FOUND;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_GOT_NOTHING;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_HTTP2;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_HTTP2_STREAM;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_HTTP_POST_ERROR;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_HTTP_RETURNED_ERROR;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_INTERFACE_FAILED;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_LOGIN_DENIED;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_NO_CONNECTION_AVAILABLE;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_NOT_BUILT_IN;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_OPERATION_TIMEDOUT;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_PARTIAL_FILE;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_PEER_FAILED_VERIFICATION;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_RANGE_ERROR;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_READ_ERROR;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_RECV_ERROR;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_REMOTE_ACCESS_DENIED;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_REMOTE_DISK_FULL;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_REMOTE_FILE_EXISTS;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_REMOTE_FILE_NOT_FOUND;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SEND_ERROR;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SEND_FAIL_REWIND;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SSL_CACERT;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SSL_CACERT_BADFILE;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SSL_CERTPROBLEM;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SSL_CIPHER;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SSL_CONNECT_ERROR;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SSL_CRL_BADFILE;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SSL_ENGINE_INITFAILED;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SSL_ENGINE_NOTFOUND;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SSL_ENGINE_SETFAILED;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SSL_INVALIDCERTSTATUS;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SSL_ISSUER_ERROR;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SSL_PINNEDPUBKEYNOTMATCH;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_SSL_SHUTDOWN_FAILED;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_TOO_MANY_REDIRECTS;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_UNKNOWN_OPTION;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_UNSUPPORTED_PROTOCOL;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_UPLOAD_FAILED;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_URL_MALFORMAT;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_USE_SSL_FAILED;
|
|
|
|
extern Eina_Error EFL_NET_HTTP_ERROR_WRITE_ERROR;
|
|
|
|
|
|
|
|
#include "efl_net_dialer_http.eo.h"
|
2016-08-29 20:28:00 -07:00
|
|
|
#include "efl_net_dialer_websocket.eo.h"
|