title: TCP Listener, written in PHP, not capturing, what it should capture
body: <p>I have adapted <a href="http://php.net/manual/en/sockets.examples.php" rel="nofollow noreferrer">example PHP TCP listener</a> (multi-client version, posted by javier in user contributed notes below main article, with my small fixes) to listen on port 7777 for any TCP packets / connections.</p>
  
  <p>I've run this listener on my home server, via SSH, and in second SSH session I have run <code>tcpdump</code> to listen on the same port, to verfiy, if my PHP listener is working fine.</p>
  
  <p>Listener is written so, it echoes everything, it receives, back to client and prints it out on the console.</p>
  
  <p>Whenever I contact my home server, with my browser, both my listener and <code>tcpdump</code> are showing captured traffic, so I assume that everything is set and is working fine. But, when I try to contact the very same server on the same port from my another device (a GPS localizer) only <code>tcpdump</code> shows, that it has captured anything, but my PHP listener remains deaf -- does not displays anything to the console (so I assume, that it also does not sends anything back to localizer -- though I can't verify this -- because, it is unable to capture any traffic from it). </p>
  
  <p>As <a href="https://superuser.com/questions/474029/tcp-packets-not-captured-by-php-listener">I have been told</a> (thanks to helpful guys from SuperUser), TCP transmission from both webbrowser and GPS localizer seems to be valid TCP packet and everything in network layer seems to be fine, therefore it looks like, the problem is somewhere in PHP listener itself.</p>
  
  <p>So, I'm asking, if anybody sees anything, that I missed here?</p>