Source/Packages

Runtime.NativeSocketRoutine

packages/execution/src/Runtime/NativeSocketRoutine.alpha

437 lines23 declarations23.5 KiBSHA-256 66fc0e347b89

def · lines 27–28

nativeSocketWordBytes

Full file
Linux x86-64 connected SOCK_STREAM transport. The caller owns a valid buffer of extent bytes and one endpoint for the duration of this call. ABI: rdi=fd, rsi=buffer, rdx=extent, rcx=poll timeout milliseconds, r8=maximum poll/IO attempts. Return extent or a negative Linux errno. A partial failure NEVER authorizes consumption or retry from the beginning: abandon this edge/session; the caller must discard partial destination data. Each attempt consumes budget, including EINTR/EAGAIN and partial progress. Poll is bounded, and MSG_DONTWAIT prevents readiness races from blocking. This bounds syscall attempts/wait intervals, not scheduler delay or a global monotonic deadline. MSG_NOSIGNAL makes a broken send a returned error. Sources: Linux man-pages recv(2), send(2), poll(2) (man7.org, 2026-10-02); Linux x86-64 syscall ABI asm/unistd_64.h. No libc/vendor runtime is called. These are platform facts; a different host ABI needs its own realization. Preserve all SysV callee-saved registers used by the enclosing native VM. Stack offsets belong to this layout; each follows the preceding field.
27def nativeSocketWordBytes =
28  (bytes-length (dataBytesWord64LE (modelWord64FromNaturalTruncated 0)))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.