diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-06 13:19:16 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-06 13:19:16 +0000 |
commit | 4a5fc4b938bc98a2edc71d4875779619d0cebeec (patch) | |
tree | a816afcf4e6d7c25e0ea8217dc89d810b8fa1eac /src/core/gnunet-service-core_sessions.h | |
parent | 2fb1bb841a5a7ce3783d84cea68938a8202928aa (diff) | |
download | gnunet-4a5fc4b938bc98a2edc71d4875779619d0cebeec.tar.gz gnunet-4a5fc4b938bc98a2edc71d4875779619d0cebeec.zip |
stuff
Diffstat (limited to 'src/core/gnunet-service-core_sessions.h')
-rw-r--r-- | src/core/gnunet-service-core_sessions.h | 52 |
1 files changed, 48 insertions, 4 deletions
diff --git a/src/core/gnunet-service-core_sessions.h b/src/core/gnunet-service-core_sessions.h index 2f8c01840..1898aa36a 100644 --- a/src/core/gnunet-service-core_sessions.h +++ b/src/core/gnunet-service-core_sessions.h | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | /** | 33 | /** |
34 | * End the session with the given peer (we are no longer | 34 | * End the session with the given peer (we are no longer |
35 | * connected). | 35 | * connected). |
36 | * | 36 | * |
37 | * @param pid identity of peer to kill session with | 37 | * @param pid identity of peer to kill session with |
38 | */ | 38 | */ |
@@ -41,9 +41,9 @@ GSC_SESSIONS_end (const struct GNUNET_PeerIdentity *pid); | |||
41 | 41 | ||
42 | 42 | ||
43 | /** | 43 | /** |
44 | * Traffic is being solicited for the given peer. This means that | 44 | * Traffic is being solicited for the given peer. This means that the |
45 | * the message queue on the transport-level is now empty and it | 45 | * message queue on the transport-level (NEIGHBOURS subsystem) is now |
46 | * is now OK to transmit another (non-control) message. | 46 | * empty and it is now OK to transmit another (non-control) message. |
47 | * | 47 | * |
48 | * @param pid identity of peer ready to receive data | 48 | * @param pid identity of peer ready to receive data |
49 | */ | 49 | */ |
@@ -52,6 +52,50 @@ GSC_SESSIONS_solicit (const struct GNUNET_PeerIdentity *pid); | |||
52 | 52 | ||
53 | 53 | ||
54 | /** | 54 | /** |
55 | * Queue a request from a client for transmission to a particular peer. | ||
56 | * | ||
57 | * @param car request to queue; this handle is then shared between | ||
58 | * the caller (CLIENTS subsystem) and SESSIONS and must not | ||
59 | * be released by either until either 'GNUNET_SESSIONS_dequeue', | ||
60 | * or 'GNUNET_CLIENTS_failed' | ||
61 | * have been invoked on it | ||
62 | */ | ||
63 | void | ||
64 | GSC_SESSIONS_queue_request (struct GSC_ClientActiveRequest *car); | ||
65 | |||
66 | |||
67 | /** | ||
68 | * Dequeue a request from a client from transmission to a particular peer. | ||
69 | * | ||
70 | * @param car request to dequeue; this handle will then be 'owned' by | ||
71 | * the caller (CLIENTS sysbsystem) | ||
72 | */ | ||
73 | void | ||
74 | GSC_SESSIONS_dequeue_request (struct GSC_ClientActiveRequest *car); | ||
75 | |||
76 | |||
77 | /** | ||
78 | * Transmit a message to a particular peer. | ||
79 | * | ||
80 | * @param car original request that was queued and then solicited, | ||
81 | * ownership does not change (dequeue will be called soon). | ||
82 | * @param msg message to transmit | ||
83 | */ | ||
84 | void | ||
85 | GSC_SESSIONS_transmit (struct GSC_ClientActiveRequest *car, | ||
86 | const struct GNUNET_MessageHeader *msg); | ||
87 | |||
88 | |||
89 | /** | ||
90 | * We have a new client, notify it about all current sessions. | ||
91 | * | ||
92 | * @param client the new client | ||
93 | */ | ||
94 | void | ||
95 | GSC_SESSIONS_notify_client_about_sessions (struct GSC_Client *client); | ||
96 | |||
97 | |||
98 | /** | ||
55 | * Initialize sessions subsystem. | 99 | * Initialize sessions subsystem. |
56 | */ | 100 | */ |
57 | void | 101 | void |