diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-01-16 11:35:45 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-01-16 11:35:45 +0000 |
commit | a98bf7b88926295d9c0c823a60c0cf7b8a981871 (patch) | |
tree | aa43d577e5cf8be0cf703618663c95972a4e64ff /src/stream | |
parent | 050c87aedbc190dbf29e8bf9de8c9cafd97a10b3 (diff) | |
download | gnunet-a98bf7b88926295d9c0c823a60c0cf7b8a981871.tar.gz gnunet-a98bf7b88926295d9c0c823a60c0cf7b8a981871.zip |
- doc
- moved write_cont callback towarding beginning of GNUNET_STREAM_WriteHandle
- rename stream_protocol.h to stream.h
Diffstat (limited to 'src/stream')
-rw-r--r-- | src/stream/Makefile.am | 2 | ||||
-rw-r--r-- | src/stream/stream.h (renamed from src/stream/stream_protocol.h) | 8 | ||||
-rw-r--r-- | src/stream/stream_api.c | 14 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/stream/Makefile.am b/src/stream/Makefile.am index 77f2d6d59..099469711 100644 --- a/src/stream/Makefile.am +++ b/src/stream/Makefile.am | |||
@@ -12,7 +12,7 @@ endif | |||
12 | lib_LTLIBRARIES = libgnunetstream.la | 12 | lib_LTLIBRARIES = libgnunetstream.la |
13 | 13 | ||
14 | libgnunetstream_la_SOURCES = \ | 14 | libgnunetstream_la_SOURCES = \ |
15 | stream_api.c stream_protocol.h | 15 | stream_api.c stream.h |
16 | libgnunetstream_la_LIBADD = \ | 16 | libgnunetstream_la_LIBADD = \ |
17 | $(top_builddir)/src/mesh/libgnunetmesh.la \ | 17 | $(top_builddir)/src/mesh/libgnunetmesh.la \ |
18 | $(top_builddir)/src/lockmanager/libgnunetlockmanager.la \ | 18 | $(top_builddir)/src/lockmanager/libgnunetlockmanager.la \ |
diff --git a/src/stream/stream_protocol.h b/src/stream/stream.h index ca14d16ed..9b92a28ee 100644 --- a/src/stream/stream_protocol.h +++ b/src/stream/stream.h | |||
@@ -19,13 +19,13 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file stream/stream_protocol.h | 22 | * @file stream/stream.h |
23 | * @brief P2P protocol for the stream connections | 23 | * @brief P2P protocol for the stream connections |
24 | * @author Sree Harsha Totakura | 24 | * @author Sree Harsha Totakura |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #ifndef STREAM_PROTOCOL_H | 27 | #ifndef STREAM_H |
28 | #define STREAM_PROTOCOL_H | 28 | #define STREAM_H |
29 | 29 | ||
30 | #ifdef __cplusplus | 30 | #ifdef __cplusplus |
31 | extern "C" | 31 | extern "C" |
@@ -187,4 +187,4 @@ GNUNET_NETWORK_STRUCT_END | |||
187 | } | 187 | } |
188 | #endif | 188 | #endif |
189 | 189 | ||
190 | #endif /* STREAM_PROTOCOL_H */ | 190 | #endif /* STREAM.H */ |
diff --git a/src/stream/stream_api.c b/src/stream/stream_api.c index 4b86bece0..20df4aaf5 100644 --- a/src/stream/stream_api.c +++ b/src/stream/stream_api.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include "gnunet_lockmanager_service.h" | 40 | #include "gnunet_lockmanager_service.h" |
41 | #include "gnunet_statistics_service.h" | 41 | #include "gnunet_statistics_service.h" |
42 | #include "gnunet_stream_lib.h" | 42 | #include "gnunet_stream_lib.h" |
43 | #include "stream_protocol.h" | 43 | #include "stream.h" |
44 | 44 | ||
45 | /** | 45 | /** |
46 | * Generic logging shorthand | 46 | * Generic logging shorthand |
@@ -462,11 +462,6 @@ struct GNUNET_STREAM_WriteHandle | |||
462 | struct GNUNET_STREAM_Socket *socket; | 462 | struct GNUNET_STREAM_Socket *socket; |
463 | 463 | ||
464 | /** | 464 | /** |
465 | * The packet_buffers associated with this Handle | ||
466 | */ | ||
467 | struct GNUNET_STREAM_DataMessage *messages[GNUNET_STREAM_ACK_BITMAP_BIT_LENGTH]; | ||
468 | |||
469 | /** | ||
470 | * The write continuation callback | 465 | * The write continuation callback |
471 | */ | 466 | */ |
472 | GNUNET_STREAM_CompletionContinuation write_cont; | 467 | GNUNET_STREAM_CompletionContinuation write_cont; |
@@ -477,6 +472,11 @@ struct GNUNET_STREAM_WriteHandle | |||
477 | void *write_cont_cls; | 472 | void *write_cont_cls; |
478 | 473 | ||
479 | /** | 474 | /** |
475 | * The packet_buffers associated with this Handle | ||
476 | */ | ||
477 | struct GNUNET_STREAM_DataMessage *messages[GNUNET_STREAM_ACK_BITMAP_BIT_LENGTH]; | ||
478 | |||
479 | /** | ||
480 | * The bitmap of this IOHandle; Corresponding bit for a message is set when | 480 | * The bitmap of this IOHandle; Corresponding bit for a message is set when |
481 | * it has been acknowledged by the receiver | 481 | * it has been acknowledged by the receiver |
482 | */ | 482 | */ |
@@ -3488,7 +3488,7 @@ GNUNET_STREAM_listen_close (struct GNUNET_STREAM_ListenSocket *lsocket) | |||
3488 | 3488 | ||
3489 | /** | 3489 | /** |
3490 | * Tries to write the given data to the stream. The maximum size of data that | 3490 | * Tries to write the given data to the stream. The maximum size of data that |
3491 | * can be written as part of a write operation is (64 * (64000 - sizeof (struct | 3491 | * can be written per a write operation is ~ 4MB (64 * (64000 - sizeof (struct |
3492 | * GNUNET_STREAM_DataMessage))). If size is greater than this it is not an API | 3492 | * GNUNET_STREAM_DataMessage))). If size is greater than this it is not an API |
3493 | * violation, however only the said number of maximum bytes will be written. | 3493 | * violation, however only the said number of maximum bytes will be written. |
3494 | * | 3494 | * |