title: websocket fin bit in c++
body: <p>im' having lately a little problem with websockets fin bit and my c++ server. Whenever i try to use FIN = 0, host drops connection with no reason. Here is part of my code to calculate FIN:</p>
  
  <pre><code>string ret
  ret += (unsigned char)((fin &amp; 1) &lt;&lt; 7) | (opcode &amp; 63);
  </code></pre>
  
  <p>When i use FIN = 1, my first byte in frame is 129, which is correct and user gets correct answear. With FIN =0 first byte is 1 which also seems to be good and then after sending connection drops. Tried to send the same packets of data with both flags and only FIN =0 fails;</p>
  
  <p>Why i try to use FIN = 0? well i'm trying to make a little three.js + websocket game, i'd like a server to send all the models through the websocket for every player, so i expect a heavy load which i'd like to control.</p>
  
  <p>I'd be happy to provide any additional informations.</p>
  
  <p>Thanks in advance.</p>