JanetDocsPlaygroundI'm feeling luckyGitHub sign in

net/address



    cfunction
    src/core/net.c on line 335, column 1

    (net/address host port &opt type multi)

    Look up the connection information for a given hostname, port, and 
    connection type. Returns a handle that can be used to send 
    datagrams over network without establishing a connection. On Posix 
    platforms, you can use :unix for host to connect to a unix domain 
    socket, where the name is given in the port argument. On Linux, 
    abstract unix domain sockets are specified with a leading '@' 
    character in port. If `multi` is truthy, will return all address 
    that match in an array instead of just the first.


1 exampleSign in to add an example
Loading...
(net/address "0.0.0.0" 80) # => <core/socket-address 0x55CABA438E90>

(net/address "0.0.0.0" 8989) # => <core/socket-address 0x55CABA439980>

jgartePlayground