title: What causes the Broken Pipe Error?
body: <p>I know that broken pipe error is thrown when the socket on the peer side is closed.</p>
  
  <p>But, in my test I have noted that an immediate 'send' call on this side when the peer side is closed doesn't always lead to a broken pipe error.</p>
  
  <p>E.g.:</p>
  
  <p>After closing the socket on peer side (I have tried clean closing by calling close and also abnormal closing by killing the peer), if I try to send 40 bytes, then I don't get a broken pipe, but, if I try to send 40000 bytes then it immediately gives broken pipe error.</p>
  
  <p>What exactly causes broken pipe and can it's behavior be predicted?</p>