send

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

Wraps send(2) — writes up to len bytes from buf to sockfd.

May write fewer bytes than requested under back-pressure; the caller must loop until the buffer is drained. Returns the byte count on success or -1 on error.

Defined in lang/std/net/libc.ks