cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Regarding Usage of Custom Application Layer in Internet Protocol Suite

From: Alan Wolfe <alan.wolfe_at_gmail.com>
Date: Fri, 31 May 2013 08:23:14 -0700

You ought to google web sockets.

Basically, with web sockets you have the initial overhead of an http
request and response, but then the connection doesn't close and you can
send and receive data (true bidirectional communication) all day long
without the overhead of http.

One of the benefits of going this route is that you dont have to write a
lot of connection & security code that is already well handled for you by
existing, mature http software (client and server side). Not only does
that save you a lot of development time, it will also make for less bugs
and security holes.
On May 31, 2013 5:13 AM, "PRAKHAR gaur" <prakhar_aaidu16_at_hotmail.com> wrote:

> Hello,
>
> I am using libcurl for a client which uses two way SSL authentication.
> curl_easy_send/recv().
> The server is also a custom implementation.
>
> Now as we want to send and receive only json, *without* a restful API,
> hence it does not make sense to use HTTP protocol.
> Hence now the message consists of:
> first 4 bytes are message length, followed by the json.
>
> When CURLOPT_URL is set to, "https://localhost:7443"
> the communication goes fine.
>
> If there is no protocol specified or "http" etc, eg,
> "localhost:7443" or "http://localhost:7443"
>
> the communication fails with error,
> "Failed to get recent socket"
>
> Now from what I understand about Application protocol, using "https" in
> the url should not have any extra overhead,
> it is used only because libcurl wants a protocol to be specified and since
> this is SSL layer hence https.
> Since the client is not sending HTTP headers and the Server is not
> expecting any, so for all intents and purpose
> the current connection is essentially a SSL over TCP/IP.
>
> My manager thinks that using libcurl with "https" will have a overhead and
> has asked the code to be rewritten using openSSL.
>
> Given the client side has to run as a monitoring agent, hence I would like
> the computational and network overhead to be a minimum.
>
> Please comment.
>
> Regards,
> --
> Prakhar Gaur
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-05-31