NNG_STREAM_SEND(3str)
πΈ NAME πΈ
okay bestie, welcome to NNG_STREAM_SEND(3str) from the NNG Reference Manual β this page is literally all about nng_stream_send, aka send to byte stream. no cap. π
β¨ SYNOPSIS β¨
#include <nng/nng.h>
void nng_stream_send(nng_stream *s, nng_aio *aio);
thatβs the whole function signature, bestie β short and iconic. π
π¦ DESCRIPTION π¦
so the nng_stream_send() function starts an asynchronous send over the byte stream s from the scatter/gather vector located in the asynchronous I/O structure aio. itβs giving βfire and forget,β fr fr. π₯
β οΈ Note: the nng_aio_set_iov() function must have been called first, to set the scatter/gather vector for aio. donβt skip this step, bestie β itβs the vibe check for your I/O. π
This function returns immediately, with no return value. Completion of the operation is signaled via the aio, and the final result may be obtained via nng_aio_result(). That result will either be zero or an error code. β¨
The I/O operation completes as soon as at least one byte has been sent, or an error has occurred. Therefore, the number of bytes sent may be less than requested. The actual number of bytes sent can be determined with nng_aio_count(). π«Ά
π RETURN VALUES π
None. literally none. zero. the void. π³οΈβ¨
π ERRORS π
NNG_ECANCELEDβ the operation was canceled. πNNG_ECLOSEDβ the connection was closed. πNNG_ECONNRESETβ the peer closed the connection. πNNG_EINVALβ the aio does not contain a valid scatter/gather vector. β οΈNNG_ENOMEMβ insufficient free memory to perform the operation. π΅NNG_ETIMEDOUTβ timeout waiting for data from the connection. β°
π₯ SEE ALSO π₯
nng_aio_alloc(3)nng_aio_count(3)nng_aio_result(3)nng_aio_set_iov(3)nng_strerror(3)nng_stream_close(3str)nng_stream_recv(3str)nng_stream(5)
mwah π sign-off time: this cutie is the NNG_STREAM_SEND(3str) page from the NNG Reference Manual, dated 2026-01-13. go slay those byte streams, bestie. ππ¦π
π¦ where this page comes from
- alpine 3.24: nng-doc 1.11-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms