<div dir="ltr"><br><br><div class="gmail_quote">On Thu, Sep 18, 2008 at 11:53 AM, Tony Garnock-Jones <span dir="ltr">&lt;<a href="mailto:tonyg@lshift.net">tonyg@lshift.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Aha!<div class="Ih2E3d"><br>
<br>
Jonatan Kallus wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 &nbsp; &nbsp; &nbsp; &nbsp; $read = fgets($this-&gt;_socket, $rb);<br>
</blockquote>
<br></div>
fgets() reads lines. Maybe try a plain old read? You&#39;ll need to buffer things between calls to readFrame, I guess.<br><font color="#888888">
</font></blockquote><div><br>The difference between fgets and fread in this case is how it decides how big chunks to read at a time. fgets does not drop the characters that makes it stop reading, afaik. Newlines and alike is returned as well. Also, the nulls from other MQs seem to work with fgets. Thanks for your answers though! I will try to make it work once again later. For now I&#39;ll just use my own implementation that only connects and sends, and fails on any unexpected answers. That&#39;s all I&#39;ll need. <br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font color="#888888"><br>
Tony<br>
<br>
</font></blockquote></div><br></div>