diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-01-24 16:47:51 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-01-24 16:47:51 +0000 |
commit | 145d221194b71a52403a8323839f7b4039764ece (patch) | |
tree | 5383522d05700fdaaf3e977575350053aa866af7 /src/include | |
parent | 6b26c6b0babd2b0964875cad68c866639ea94936 (diff) | |
download | gnunet-145d221194b71a52403a8323839f7b4039764ece.tar.gz gnunet-145d221194b71a52403a8323839f7b4039764ece.zip |
adding support for outbound message monitoring
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_core_service.h | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h index d35e6fb85..af431ba56 100644 --- a/src/include/gnunet_core_service.h +++ b/src/include/gnunet_core_service.h | |||
@@ -148,8 +148,15 @@ typedef void | |||
148 | 148 | ||
149 | 149 | ||
150 | /** | 150 | /** |
151 | * Connect to the core service. Note that the connection may | 151 | * Connect to the core service. Note that the connection may complete |
152 | * complete (or fail) asynchronously. | 152 | * (or fail) asynchronously. This function primarily causes the given |
153 | * callback notification functions to be invoked whenever the | ||
154 | * specified event happens. The maximum number of queued | ||
155 | * notifications (queue length) is per client but the queue is shared | ||
156 | * across all types of notifications. So a slow client that registers | ||
157 | * for 'outbound_notify' also risks missing 'inbound_notify' messages. | ||
158 | * Certain events (such as connect/disconnect notifications) are not | ||
159 | * subject to queue size limitations. | ||
153 | * | 160 | * |
154 | * @param sched scheduler to use | 161 | * @param sched scheduler to use |
155 | * @param cfg configuration to use | 162 | * @param cfg configuration to use |
@@ -161,14 +168,29 @@ typedef void | |||
161 | * @param connects function to call on peer connect, can be NULL | 168 | * @param connects function to call on peer connect, can be NULL |
162 | * @param disconnects function to call on peer disconnect / timeout, can be NULL | 169 | * @param disconnects function to call on peer disconnect / timeout, can be NULL |
163 | * @param inbound_notify function to call for all inbound messages, can be NULL | 170 | * @param inbound_notify function to call for all inbound messages, can be NULL |
171 | * note that the core is allowed to drop notifications about inbound | ||
172 | * messages if the client does not process them fast enough (for this | ||
173 | * notification type, a bounded queue is used) | ||
164 | * @param inbound_hdr_only set to GNUNET_YES if inbound_notify will only read the | 174 | * @param inbound_hdr_only set to GNUNET_YES if inbound_notify will only read the |
165 | * GNUNET_MessageHeader and hence we do not need to give it the full message; | 175 | * GNUNET_MessageHeader and hence we do not need to give it the full message; |
166 | * can be used to improve efficiency, ignored if inbound_notify is NULLL | 176 | * can be used to improve efficiency, ignored if inbound_notify is NULL |
167 | * @param outbound_notify function to call for all outbound messages, can be NULL | 177 | * note that the core is allowed to drop notifications about inbound |
178 | * messages if the client does not process them fast enough (for this | ||
179 | * notification type, a bounded queue is used) | ||
180 | * @param outbound_notify function to call for all outbound messages, can be NULL; | ||
181 | * note that the core is allowed to drop notifications about outbound | ||
182 | * messages if the client does not process them fast enough (for this | ||
183 | * notification type, a bounded queue is used) | ||
168 | * @param outbound_hdr_only set to GNUNET_YES if outbound_notify will only read the | 184 | * @param outbound_hdr_only set to GNUNET_YES if outbound_notify will only read the |
169 | * GNUNET_MessageHeader and hence we do not need to give it the full message | 185 | * GNUNET_MessageHeader and hence we do not need to give it the full message |
170 | * can be used to improve efficiency, ignored if outbound_notify is NULLL | 186 | * can be used to improve efficiency, ignored if outbound_notify is NULL |
187 | * note that the core is allowed to drop notifications about outbound | ||
188 | * messages if the client does not process them fast enough (for this | ||
189 | * notification type, a bounded queue is used) | ||
171 | * @param handlers callbacks for messages we care about, NULL-terminated | 190 | * @param handlers callbacks for messages we care about, NULL-terminated |
191 | * note that the core is allowed to drop notifications about inbound | ||
192 | * messages if the client does not process them fast enough (for this | ||
193 | * notification type, a bounded queue is used) | ||
172 | * @return handle to the core service (only useful for disconnect until 'init' is called), | 194 | * @return handle to the core service (only useful for disconnect until 'init' is called), |
173 | * NULL on error (in this case, init is never called) | 195 | * NULL on error (in this case, init is never called) |
174 | */ | 196 | */ |