20 lines
584 B
Plaintext
20 lines
584 B
Plaintext
:sig
|
|
String socket_read(u64 sockfd, u32 max_length = 1024*128, u32 timeout = 1);
|
|
|
|
:params
|
|
sockfd : socket handle
|
|
max_length : optional maximum data size, defaults to 128kBytes
|
|
timeout : optional operation timeout, defaults to one second
|
|
return value : string containing the data that was read
|
|
|
|
:see
|
|
>socket
|
|
|
|
:content
|
|
Reads data from a socket connection.
|
|
|
|
`max_length` limits how much data is read, and `timeout` controls how long the operation is allowed to wait.
|
|
|
|
:example
|
|
print("socket_read is resource-bound; configure the service or connection, then call it in request code.\n");
|