]> git.cworth.org Git - ttt/blobdiff - src/ttt-socket.h
2005-11-14 Carl Worth <cworth@cworth.org>
[ttt] / src / ttt-socket.h
index 909501e0e37880c0f44d178d12e5d71b069b058d..6b35ef23649111dca03457b95925b4640b075ab6 100644 (file)
@@ -55,4 +55,24 @@ ttt_socket_accept (int                                listen_socket,
                   ttt_socket_accept_func_t      accept,
                   void                         *closure);
 
+/* Performa a blocking read, until all count bytes are read from the
+ * socket to buf, which must be of size count or larger.
+ *
+ * Errors: If any errors occur, this function does not return.
+ */
+void
+ttt_socket_read (int    socket,
+                void   *buf,
+                size_t  count);
+
+/* Perform a blocking write, until all count bytes are written from
+ * buf to the socket.
+ *
+ * Errors: If any errors occur, this function does not return.
+ */
+void
+ttt_socket_write (int           socket,
+                 const void    *buf,
+                 size_t         count);
+
 #endif