Create an unconnected TCP socket, using asynchronous blocking semantics by default.
ProtectedblockingProtected OptionaldetachRemove event listeners from the current transport.
ProtectedepochProtected OptionalfailureProtected OptionaltransportUnderlying TCP or TLS socket.
Static ReadonlyAnyLet the system assign an available port when binding.
Static ReadonlyStatusSocket operation status enumeration.
Static ReadonlyTlsTLS handshake 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.
Start a TCP connection; wait for completion by default, or return NotReady in nonblocking mode. Time.Zero disables the timeout.
addressporttimeoutProtectedcreateAllocate 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.
handleClose the connection immediately and clear pending packet transfer state.
Return the cipher suite name negotiated during the handshake, or undefined before TLS completes.
Return the latest underlying error, or undefined if none is recorded.
Return the local port, or 0 if not yet assigned.
ProtectedgetProvide subclasses with the underlying Node transport, or undefined if not yet created.
ProtectedgetReturn readiness bits for receiving, sending, and the TLS handshake.
maskReturn the peer address, or undefined when not connected.
Return the peer port, or 0 when not connected.
ProtectedisReturn TCP transport liveness; derived classes may extend this.
Return whether blocking semantics use asynchronous waits.
ProtectedonClear frame parsing, TLS, and send snapshots on recreation; the base-class generation mechanism cancels old waits.
ProtectedonIntegrate the handle allocated or adopted by protected create into TCP send/receive and readiness state.
Replace packet after receiving a complete length-prefixed packet. Nonblocking mode retains incomplete frames; receive at most 64 MiB.
packetReceive into data and return the actual byte count; do not modify the destination buffer before completion.
dataSend a call-time packet snapshot with an automatic network-order u32 length header; continue with the same Packet after Partial.
packetSend a call-time byte snapshot; after Partial, retry the remaining bytes starting at the sent offset.
dataSet whether to wait asynchronously for readability/writability. When false, return NotReady or Partial according to current queue state.
blockingUpgrade an idle connection to a TLS client with verification enabled by default; CA bytes may use PEM or DER.
hostnameverifyOrCaUpgrade to a TLS server using a PEM/DER certificate and private key; password bytes retain their raw contents and subview bounds.
certificatekeypasswordProtectedvalidateReject UDP or listener transports before adoption.
handleReadonly[socketLet listeners adopt accepted connections through the same lifecycle.
socketExpose overridable liveness state to Selector.
Expose overridable readiness conditions to Selector.
mask
TCP socket supporting raw bytes, SFML Packet framing, and TLS upgrades.