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

Daniel Hallin Widgren daniel.widgren@REDACTED
Sat Mar 7 09:28:11 CET 2015


Have you tried ssl:recv/2?
Den 7 mar 2015 09:14 skrev "Daniel Hallin Widgren" <daniel.widgren@REDACTED
>:

> 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" <zgu@REDACTED>:
>
>>  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
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150307/37303f67/attachment.htm>


More information about the erlang-questions mailing list