AbstractProtectedconstructorInitialize common socket state with blocking semantics enabled by default.
typeProtectedblockingProtected OptionaldetachRemove event listeners from the current transport.
ProtectedepochProtected OptionalfailureProtected OptionaltransportCurrently owned Node transport, released by Node on close or recreation.
Static ReadonlyAnyLet the system assign an available port when binding.
Static ReadonlyStatusSocket operation status enumeration.
Static ReadonlyTypeSocket transport protocol enumeration.
ProtectedallocateAllocate an unconnected transport by protocol; listeners may override this to use a Node Server.
addressTypeProtectedawaitcheckgenerationProtectedawaitWait for a write or generation cancellation; closing does not depend on whether the underlying write callback fires.
completiongenerationProtectedchangedProtectedcloseClose the current transport and wake waits from the previous generation. Repeated calls are safe; the blocking flag is unchanged.
ProtectedcreateAllocate a transport for the given address family without implicitly connecting or binding a port.
addressTypeOptionalAdopt a Node transport and close the old one; do not adopt raw file descriptors.
handleReturn the latest underlying error, or undefined if none is recorded.
ProtectedgetProvide subclasses with the underlying Node transport, or undefined if not yet created.
ProtectedgetBy default, TCP readiness follows readable bytes and write backpressure; bound UDP sockets can send. Subclasses report UDP datagrams and Server connection queues to Selector through this hook and changed().
maskProtectedisBy default, check whether the Node transport is alive; subclasses may override this without importing internal symbols.
Return whether blocking semantics use asynchronous waits.
ProtectedonClean up subclass state on close; the old transport is already detached when this is called.
ProtectedonInstall default TCP/UDP/Server state listeners; subclasses may override this to manage their own send/receive queues.
Set whether to wait asynchronously for readability/writability. When false, return NotReady or Partial according to current queue state.
blockingProtectedvalidateValidate the transport type before adoption to avoid discovering a type error after closing the old connection.
handleReadonly[socketExpose overridable liveness state to Selector.
Expose overridable readiness conditions to Selector.
mask
Common base for Node network transports; defaults to blocking semantics implemented with asynchronous waits.