TcpConnection.onEof
Set the read half-close callback.
Parameters
callback | Callback invoked when the peer shuts its write direction down (read EOF). Callback contract: invoked on the event loop thread when a graceful peer FIN arrives. When set, the connection stays open for sending after the EOF so replies can still flow; call shutdownWrite() or close() when done. When unset, a peer FIN closes the connection as before and onClose fires with SocketCloseReason.EOF. Does not fire after dispose(). |