title: I need a TCP option (ioctl) to send data immediately
body: <p>I've got an unusual situation: I'm using a Linux system in an embedded situation (Intel box, currently using a 2.6.20 kernel.) which has to communicate with an embedded system that has a partially broken TCP implementation. As near as I can tell right now they expect each message from us to come in a separate Ethernet frame! They seem to have problems when messages are split across Ethernet frames. </p>
  
  <p>We are on the local network with the device, and there are no routers between us (just a switch).</p>
  
  <p>We are, of course, trying to force them to fix their system, but that may not end up being feasible.</p>
  
  <p>I've already set TCP_NODELAY on my sockets (I connect to them), but that only helps if I don't try to send more than one message at a time. If I have several outgoing messages in a row, those messages tend to end up in one or two Ethernet frames, which causes trouble on the other system.</p>
  
  <p>I can generally avoid the problem by using a timer to avoid sending messages too close together, but that obviously limits our throughput. Further, if I turn the time down too low, I risk network congestion holding up packet transmits and ending up allowing more than one of my messages into the same packet.</p>
  
  <p>Is there any way that I can tell whether the driver has data queued or not? Is there some way I can force the driver to send independent write calls in independent transport layer packets? I've had a look through the socket(7) and tcp(7) man pages and I didn't find anything. It may just be that I don't know what I'm looking for. </p>
  
  <p>Obviously, UDP would be one way out, but again, I don't think we can make the other end change anything much at this point.</p>
  
  <p>Any help greatly appreciated.</p>