19 lines
435 B
Plaintext
19 lines
435 B
Plaintext
:sig
|
|
u64 socket_connect(String host, short port)
|
|
|
|
:params
|
|
host : host name
|
|
port : port number
|
|
return value : the socket handle
|
|
|
|
:see
|
|
>socket
|
|
|
|
:content
|
|
Opens a socket connection to the given `host` and `port`.
|
|
|
|
The returned socket handle is then used with `socket_read()`, `socket_write()`, and `socket_close()`.
|
|
|
|
:example
|
|
print("socket_connect is resource-bound; configure the service or connection, then call it in request code.\n");
|