mirror of
https://github.com/janet-lang/janet
synced 2024-12-26 16:30:26 +00:00
Update documentation for net/read and net/chunk.
This commit is contained in:
parent
6b0f93ce8a
commit
c98e1f3cae
@ -685,14 +685,14 @@ static const JanetReg net_cfuns[] = {
|
|||||||
{
|
{
|
||||||
"net/read", cfun_stream_read,
|
"net/read", cfun_stream_read,
|
||||||
JDOC("(net/read stream nbytes &opt buf)\n\n"
|
JDOC("(net/read stream nbytes &opt buf)\n\n"
|
||||||
"Read n bytes from a stream, suspending the current fiber until the bytes are available. "
|
"Read up to n bytes from a stream, suspending the current fiber until the bytes are available. "
|
||||||
"Returns a buffer with n more bytes in it.")
|
"If less than n bytes are available (and more than 0), will push those bytes and return early. "
|
||||||
|
"Returns a buffer with up to n more bytes in it.")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"net/chunk", cfun_stream_chunk,
|
"net/chunk", cfun_stream_chunk,
|
||||||
JDOC("(net/chunk stream nbytes &opt buf)\n\n"
|
JDOC("(net/chunk stream nbytes &opt buf)\n\n"
|
||||||
"Same a net/read, but will return as soon as any data is available "
|
"Same a net/read, but will wait for all n bytes to arrive rather than return early.")
|
||||||
"rather than wait for all n bytes to arrive.")
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"net/write", cfun_stream_write,
|
"net/write", cfun_stream_write,
|
||||||
|
Loading…
Reference in New Issue
Block a user