-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Node.js' socket API allows for a allowHalfOpen option whose behavior is simply defined as:
If allowHalfOpen=false, when a socket receives a fin from the peer, the socket will be automatically transitioned into a draining state where the writable side is closed, existing writes in the queue are permitted to drain, followed by a fin sent immediately when the queue is drained.
If allowHalfOpen=true, when a socket receives a fin from the peer, only the readable side of the socket is closed. The writable side remains open until the user code explicitly closes the stream.
At all times, the stream allows a writable-closed-readable-open state.
For Node.js sockets, the default is allowHalfOpen=false.
The key question here is whether this is something that y'all considered for direct sockets and ruled out, didn't consider at all, decided Node.js' behavior is wrong, etc.