[erlang-questions] gen_tcp:recv/2 does not work with ssl socket?

Daniel Hallin Widgren <>
Sat Mar 7 09:14:15 CET 2015


I think socket needs to be in the format that you get from gen_tcp:accept.
Den 7 mar 2015 08:16 skrev "Zhongxian Gu" <>:

>  Hi,
>
>  With a ssl_socket, I tried to get a fixed number of bytes through
> en_tcp:recv(SslSocket, 1) but failed.
>
>  The stack trace pointed to:
>
>  ** {function_clause,[{gen_tcp,recv,
>
> [{sslsocket,{gen_tcp,#Port<0.1418>},<0.534.0>},
>                                1],
>                               [{file,"gen_tcp.erl"},{line,280}]},
>
>  Does that means gen_tcp:recv function does not work with Ssl socket?
>
>  Thanks,
>
>  Zhongxian
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150307/c1b0310f/attachment.html>


More information about the erlang-questions mailing list