1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-27 00:40:26 +00:00

Update documentation.

Documenting the new bindhost parameter to net/connect.
This commit is contained in:
llmII 2021-09-06 10:54:11 -05:00
parent 470e8f6fc7
commit 4370cb77e7
No known key found for this signature in database
GPG Key ID: E3AD2E259F58A9A0

View File

@ -376,10 +376,12 @@ JANET_CORE_FN(cfun_net_sockaddr,
} }
JANET_CORE_FN(cfun_net_connect, JANET_CORE_FN(cfun_net_connect,
"(net/connect host port &opt type)", "(net/connect host port &opt type bindhost)",
"Open a connection to communicate with a server. Returns a duplex stream " "Open a connection to communicate with a server. Returns a duplex stream "
"that can be used to communicate with the server. Type is an optional keyword " "that can be used to communicate with the server. Type is an optional keyword "
"to specify a connection type, either :stream or :datagram. The default is :stream. ") { "to specify a connection type, either :stream or :datagram. The default is :stream. "
"Bindhost is an optional string to select from what address to make the outgoing "
"connection, with the default being the same as using the OS's preferred address. ") {
janet_arity(argc, 2, 4); janet_arity(argc, 2, 4);
int socktype = janet_get_sockettype(argv, argc, 2); int socktype = janet_get_sockettype(argv, argc, 2);