Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>If a message is bad, write error message (6 bytes), flush it, close the socket and do not read any unread messages in the socket. Otherwise continue reading messages.</p> </blockquote> <p>That will cause a connection reset, which will be seen by the client as a broken pipe in Unix, Linux etc.</p> <blockquote> <p>After writing N good messages, write one bad message and continue writing M good messages.</p> </blockquote> <p>That will encounter the broken pipe error just mentioned.</p> <blockquote> <p>This process happens in a separate thread.</p> </blockquote> <p>Why? The whole point of NIO and therefore Netty is that you don't need extra threads.</p> <blockquote> <p>I've found that server is closing connection after writing the error message.</p> </blockquote> <p>Well that's what you said it does, so it does it.</p> <blockquote> <p>Client began seeing broken pipe errors when writing good messages after the bad message.</p> </blockquote> <p>As I said.</p> <blockquote> <p>This is because server detected bad message and responded with error message and closed socket.</p> </blockquote> <p>Correct.</p> <blockquote> <p>Client is not reading error message from server always.</p> </blockquote> <p>Due to the connection reset. The delivery of pending data ceases after a reset.</p> <blockquote> <p>Does netty trigger channel read if the write fails due to broken pipe?</p> </blockquote> <p>No, it triggers read when data or EOS arrives</p> <p>However your bizarre system design/protocol is making that unpredictable if not impossible. You're writing a bad message that will cause a reset, followed by good messages that you already know won't get through, and trying to read a response that may have been thrown away. It doesn't make any sense to me whatsoever. What are you trying to prove here?</p> <p>Try a request-response protocol like everybody else.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload