Esc

peer_address

procedureextensionsince 0.36.1Source
  • macOS: peer_address works on macOS
  • Linux: peer_address works on Linux
  • Windows: peer_address works on Windows
  • Wasm: peer_address works on Wasm

The server's observed remote socket address, copied by value. A client call or cleared handle returns an unspecified address; this does not identify a user. .

Signature

peer_address :: (call: *Call) -> Io.Address
Example
Io :: #import "Extensions/Io";

log_peer :: (call: *Call, data: *void) -> Status {
    print("call from %\n", Io.address_to_string(peer_address(call)));
    return .{};
}

See also