title: TCP Sockets: Double messages
body: <p>I'm having a problem with sockets in python.</p>
  
  <p>I have a a TCP server and client that send each other data in a <code>while 1</code> loop.</p>
  
  <p>It packages up 2 shorts in the struct module (<code>struct.pack("hh", mousex, mousey)</code>). But sometimes when <code>recv</code>ing the data on the other computer, it seems like 2 messages have been glued together. Is this nagle's algorithm?</p>
  
  <p><img src="https://i.stack.imgur.com/MQhsf.png" alt="enter image description here"></p>
  
  <p>What exactly is going on here? Thanks in advance.</p>