src/line_proto.h
changeset 11 14e79683c48c
parent 10 9fe218576d13
child 12 4147fae232d9
--- a/src/line_proto.h	Sun Feb 22 10:16:28 2009 +0200
+++ b/src/line_proto.h	Sat Feb 28 17:39:37 2009 +0200
@@ -15,7 +15,7 @@
 /*
  * The callback for receiving lines
  */
-typedef void (*line_proto_read_cb)(struct line_proto *lp, const char *line, void *arg);
+typedef void (*line_proto_read_cb)(const char *line, void *arg);
 
 /*
  * Create a new line_proto off the the given sock_stream. The newly allocated line_proto will be returned via *lp_ptr.
@@ -28,10 +28,9 @@
         line_proto_read_cb cb_func, void *cb_arg, struct error_info *err);
 
 /*
- * Receive one line into the given buffer. The line will be terminated with '\r\n', and said terminator will be
- * NUL'd out, so the buffer is safe for use as a C-string after succesfull return.
- *
- * Note: currently this uses the buffer to store intermediate state, so always pass the same buffer (for now).
+ * Runs the socket recv() into our internal buffer. If a full line was received, a pointer to our internal bufffer is
+ * returned via *line_ptr, and we return SUCCESS. If we don't yet have a full line, and receiving more would block,
+ * NULL is returned via *line_ptr instead. Otherwise, nonzero error return code.
  */
 err_t line_proto_read (struct line_proto *lp, const char **line_ptr);