<p dir="ltr">Have you tried ssl:recv/2?</p>
<div class="gmail_quote">Den 7 mar 2015 09:14 skrev "Daniel Hallin Widgren" <<a href="mailto:daniel.widgren@gmail.com">daniel.widgren@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I think socket needs to be in the format that you get from gen_tcp:accept. </p>
<div class="gmail_quote">Den 7 mar 2015 08:16 skrev "Zhongxian Gu" <<a href="mailto:zgu@datometry.com" target="_blank">zgu@datometry.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>
<div>Hi, </div>
<div><br>
</div>
<div>With a ssl_socket, I tried to get a fixed number of bytes through en_tcp:recv(SslSocket, 1) but failed. </div>
<div><br>
</div>
<div>The stack trace pointed to:</div>
<div><br>
</div>
<div>
<div>** {function_clause,[{gen_tcp,recv,</div>
<div>                              [{sslsocket,{gen_tcp,#Port<0.1418>},<0.534.0>},</div>
<div>                               1],</div>
<div>                              [{file,"gen_tcp.erl"},{line,280}]},</div>
</div>
<div><br>
</div>
<div>Does that means gen_tcp:recv function does not work with Ssl socket? </div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Zhongxian</div>
</div>
</div>

<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div>
</blockquote></div>