recv

public func recv(Int32, Pointer[UInt8], Int64, Int32) -> Int64

Wraps recv(2) — reads up to len bytes from sockfd into buf.

Returns the byte count on success (which may be less than len), 0 on orderly shutdown by the peer, or -1 on error. flags is a bitmask of MSG_* modifiers (0 for the default).

Defined in lang/std/net/libc.ks