JanetDocsSourcePlaygroundI'm feeling luckyCommunityGitHub sign in

net/listen

core-api


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

    (net/listen host port &opt type no-reuse)

    Creates a server. Returns a new stream that is neither readable nor 
    writeable. Use net/accept or net/accept-loop be to handle 
    connections and start the server. The type parameter specifies the 
    type of network connection, either a :stream (usually tcp), or 
    :datagram (usually udp). If not specified, the default is :stream. 
    The host and port arguments are the same as in net/address. The 
    last boolean parameter `no-reuse` will disable the use of 
    SO_REUSEADDR and SO_REUSEPORT when creating a server on some 
    operating systems.


0 examplesSign in to add an example
Loading...