[erlang-questions] Listen to SSL and normal TCP connections on the same port

Anthony Ramine n.oxyde@REDACTED
Wed Apr 17 08:08:16 CEST 2013


Hello Pablo,

If you can't change the client, surely the client as a way to advertise whether it is intending to use plain old TCP or SSL?

Otherwise, to upgrade a plain old TCP socket to SSL, you should use ssl:ssl_accept/{1,3}, which probably suffers from a small documentation problem.

Regards,

-- 
Anthony Ramine

Le 17 avr. 2013 à 01:38, pablo platt a écrit :

> Hi,
> 
> Is it possible to accept SSL connections and normal TCP connections on the same port?
> Maybe accept normal TCP connections. If the connection is SSL connection pass it to the ssl module  and if it is a normal TCP connection just handle the socket.
> 
> If it is possible, how can I distinct SSL from non SSL connections?
> How can I pass the socket to the ssl module?
> 
> In my case I control the server but I can't change the client.
> 
> Thanks
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list