title: Problem transmitting null character over sockets
body: <p>I am writing a small Java server, and a matching client in C++, which implement a simple IM service over the <a href="http://stomp.codehaus.org/Protocol" rel="nofollow noreferrer">STOMP protocol</a>.</p>
  
  <p>The protocol specifies that every <em>frame</em> (message that passes between server and client, if you will) must end with a null character, which in code I refer to as <strong><code>'\0'</code></strong>, both in Java and in C++.</p>
  
  <p>However, when I transmit a frame over TCP via sockets, the null character simply does not show up, on either side. I am working with UTF-8 encoding, and tried switching to ASCII, didn't help.</p>
  
  <p>What am I doing wrong?</p>