diff --git a/mongoose.h b/mongoose.h index 60cfc3c2c8bb1e30e8ca52e5b31f937a0b96b588..58e484b089213d421e261e6d93aca6b52eae2828 100644 --- a/mongoose.h +++ b/mongoose.h @@ -239,6 +239,10 @@ void mg_send_file(struct mg_connection *conn, const char *path); // Read data from the remote end, return number of bytes read. +// Return: +// 0 connection has been closed by peer. No more data could be read. +// < 0 read error. No more data could be read from the connection. +// > 0 number of bytes read into the buffer. int mg_read(struct mg_connection *, void *buf, size_t len);