<div dir="ltr"><div>Thanks <br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/28 Chandru <span dir="ltr"><<a href="mailto:chandrashekhar.mullaparthi@gmail.com" target="_blank">chandrashekhar.mullaparthi@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Change HTTP/1.1 to HTTP/1.0. The server will then close the connection when it has sent all the data.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On 28 March 2013 08:16, 月忧茗 <span dir="ltr"><<a href="mailto:yueyoum@gmail.com" target="_blank">yueyoum@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><br></div>Hi, <br><br></div>I'm learning Erlang, And I have some code, to get web site content.<br>
<br><a href="http://pastebin.com/BDeUuymX" target="_blank">http://pastebin.com/BDeUuymX</a><br><br><br></div>
in erlang shell:<br><br><br><div><div>c(test).<br></div><div>test:start("<a href="http://www.yahoo.com" target="_blank">www.yahoo.com</a>", 80).<br><br></div><div>I MUST waiting for the remote website close the socket,<br>
</div>
<div>after that, I got {tcp_closed, Socket} msg,<br>then finish the loop.<br><br></div><div>But, Waiting for remote close socket was takes a 'long' time,<br><br></div><div>Is there any way to know, i have already get the whole data, and close the socket by myself?<br>
<br><br></div><div>using Content-Length? How?<br><br><br></div><div>another question:<br><br></div><div>test:start("<a href="http://github.com" target="_blank">github.com</a>", 443).<br><br></div><div>when play with such this 'https' sites, the code can not working.<br>
</div><div>It seems like being blocked. can not receive the data, and finally closed by remote sites.<br><br><br></div><div>Thanks.<span><font color="#888888"><br></font></span></div><span><font color="#888888"><div>
<br><br><br><br><br><div><div><br><br><br><br><br clear="all"><br>-- <br><div dir="ltr">
My GitHub<br><a href="https://github.com/yueyoum" target="_blank">https://github.com/yueyoum</a><br><br>My Blog<br><a href="http://codeshift.org" target="_blank">http://codeshift.org</a><br></div>
</div></div></div></font></span></div></div>
<br></div></div>_______________________________________________<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><br></div>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">My GitHub<br><a href="https://github.com/yueyoum" target="_blank">https://github.com/yueyoum</a><br><br>My Blog<br><a href="http://codeshift.org" target="_blank">http://codeshift.org</a><br>
</div>
</div>