anntp

a nntp implementation in pure C99
Log | Files | Refs | README | LICENSE

commit f656a66a6bf497e196458cd39dbccccba0935dbe
parent 61e8d1369f74689ac22612f33e1b6335b1f28516
Author: Mario Rosell R. Martinez <mario@mariorosell.es>
Date:   Fri, 20 Mar 2026 19:48:49 +0100

Add example

Diffstat:
Manntp.h | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/anntp.h b/anntp.h @@ -169,7 +169,7 @@ ANNTP_API ssize_t anntp_readline(AnntpConnection* conn, char* buf, size ANNTP_API ssize_t anntp_readdot(AnntpConnection* conn, char* buf, size_t maxlen); ANNTP_API int anntp_readdot_cb(AnntpConnection* conn, AnntpLineCb cb, void* extra); ANNTP_API int anntp_auth(AnntpConnection* conn, const char* login, const char* password); -ANNTP_API char* anntp_strerr(AnntpErrCode err); +ANNTP_API char* anntp_strerror(AnntpErrCode err); #endif /* ANNTP_H */ @@ -312,6 +312,7 @@ anntp_write(AnntpConnection* cv, const uchar_t* buf, size_t len) } #endif + ssize_t n = write(cv->fd, buf, (int)len); return (n < 0) ? ANNTPE(ANE_IO) : n; }