[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r20050 - gnunet/src/include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r20050 - gnunet/src/include |
Date: |
Sun, 26 Feb 2012 23:31:40 +0100 |
Author: harsha
Date: 2012-02-26 23:31:40 +0100 (Sun, 26 Feb 2012)
New Revision: 20050
Modified:
gnunet/src/include/gnunet_stream_lib.h
Log:
-added seperate io handles for read and write
Modified: gnunet/src/include/gnunet_stream_lib.h
===================================================================
--- gnunet/src/include/gnunet_stream_lib.h 2012-02-26 20:55:37 UTC (rev
20049)
+++ gnunet/src/include/gnunet_stream_lib.h 2012-02-26 22:31:40 UTC (rev
20050)
@@ -206,12 +206,17 @@
/**
- * Handle to cancel IO operations.
+ * Handle to cancel IO write operations.
*/
-struct GNUNET_STREAM_IOHandle;
+struct GNUNET_STREAM_IOWriteHandle;
/**
+ * Handle to cancel IO read operations.
+ */
+struct GNUNET_STREAM_IOReadHandle;
+
+/**
* Tries to write the given data to the stream
*
* @param socket the socket representing a stream
@@ -222,7 +227,7 @@
* @param write_cont_cls the closure
* @return handle to cancel the operation; NULL if a previous write is pending
*/
-struct GNUNET_STREAM_IOHandle *
+struct GNUNET_STREAM_IOWriteHandle *
GNUNET_STREAM_write (struct GNUNET_STREAM_Socket *socket,
const void *data,
size_t size,
@@ -257,22 +262,31 @@
* @param proc_cls the closure for proc
* @return handle to cancel the operation
*/
-struct GNUNET_STREAM_IOHandle *
-GNUNET_STREAM_read (const struct GNUNET_STREAM_Socket *socket,
+struct GNUNET_STREAM_IOReadHandle *
+GNUNET_STREAM_read (struct GNUNET_STREAM_Socket *socket,
struct GNUNET_TIME_Relative timeout,
GNUNET_STREAM_DataProcessor proc,
void *proc_cls);
/**
- * Cancel pending read or write operation.
+ * Cancel pending write operation.
*
* @param ioh handle to operation to cancel
*/
void
-GNUNET_STREAM_io_cancel (struct GNUNET_STREAM_IOHandle *ioh);
+GNUNET_STREAM_io_write_cancel (struct GNUNET_STREAM_IOWriteHandle *ioh);
+/**
+ * Cancel pending read operation.
+ *
+ * @param ioh handle to operation to cancel
+ */
+void
+GNUNET_STREAM_io_read_cancel (struct GNUNET_STREAM_IOReadHandle *ioh);
+
+
#if 0
{
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r20050 - gnunet/src/include,
gnunet <=