src/line_proto.h
changeset 19 8c80580ccde9
parent 18 dedf137b504f
child 28 9c1050bc8709
--- a/src/line_proto.h	Sat Feb 28 22:47:39 2009 +0200
+++ b/src/line_proto.h	Sat Feb 28 23:48:34 2009 +0200
@@ -32,7 +32,7 @@
  * 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, char **line_ptr);
+err_t line_proto_recv (struct line_proto *lp, char **line_ptr);
 
 /*
  * Write a single line to the sock_stream, buffering any incomplete fragment that remains unset. Returns zero if the
@@ -40,7 +40,13 @@
  *
  * The given line should already include the terminating '\r\n' character sequence.
  */
-int line_proto_write (struct line_proto *lp, const char *line);
+int line_proto_send (struct line_proto *lp, const char *line);
+
+/*
+ * Flush out any buffered line fragment. Returns zero if the buffer was flushed empty, >0 if there's still fragments
+ * remaining, or -err on errors.
+ */
+int line_proto_flush (struct line_proto *lp);
 
 /*
  * Get current error_info*