JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in

net/address

core-api


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

    (net/address host port &opt cntype multi)

    Look up the connection information for a given `host`, `port`, and 
    connection type `cntype`. Returns a handle that can be used to send 
    datagrams over the 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, returns all 
    addresses 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