diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-04 21:05:33 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-04 21:05:33 +0000 |
commit | 7a60a53dc6196477508fcdd1aef7994a2151814f (patch) | |
tree | f5c10dffa5290dac59d1d3e86f2e2e7093a067ad /src/transport/gnunet-service-transport_clients.c | |
parent | 8ee9da8977211e202dda36db87959b1426a3ce1d (diff) | |
download | gnunet-7a60a53dc6196477508fcdd1aef7994a2151814f.tar.gz gnunet-7a60a53dc6196477508fcdd1aef7994a2151814f.zip |
improved client API
Diffstat (limited to 'src/transport/gnunet-service-transport_clients.c')
-rw-r--r-- | src/transport/gnunet-service-transport_clients.c | 114 |
1 files changed, 113 insertions, 1 deletions
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c index 9fe367c16..aabd1f225 100644 --- a/src/transport/gnunet-service-transport_clients.c +++ b/src/transport/gnunet-service-transport_clients.c | |||
@@ -47,16 +47,128 @@ GST_clients_stop () | |||
47 | } | 47 | } |
48 | 48 | ||
49 | 49 | ||
50 | |||
51 | /** | ||
52 | * Initialize a normal client. We got an init message from this | ||
53 | * client, add him to the list of clients for broadcasting of inbound | ||
54 | * messages. | ||
55 | * | ||
56 | * @param cls unused | ||
57 | * @param client the client | ||
58 | * @param message the init message that was sent | ||
59 | */ | ||
60 | void | ||
61 | GST_clients_handle_init (void *cls, | ||
62 | struct GNUNET_SERVER_Client *client, | ||
63 | const struct GNUNET_MessageHeader *message) | ||
64 | { | ||
65 | } | ||
66 | |||
67 | |||
68 | /** | ||
69 | * Client asked for transmission to a peer. Process the request. | ||
70 | * | ||
71 | * @param cls unused | ||
72 | * @param client the client | ||
73 | * @param message the send message that was sent | ||
74 | */ | ||
75 | void | ||
76 | GST_clients_handle_send (void *cls, | ||
77 | struct GNUNET_SERVER_Client *client, | ||
78 | const struct GNUNET_MessageHeader *message) | ||
79 | { | ||
80 | } | ||
81 | |||
82 | |||
83 | /** | ||
84 | * Client asked for a quota change for a particular peer. Process the request. | ||
85 | * | ||
86 | * @param cls unused | ||
87 | * @param client the client | ||
88 | * @param message the quota changing message | ||
89 | */ | ||
90 | void | ||
91 | GST_clients_handle_set_quota (void *cls, | ||
92 | struct GNUNET_SERVER_Client *client, | ||
93 | const struct GNUNET_MessageHeader *message) | ||
94 | { | ||
95 | } | ||
96 | |||
97 | |||
98 | /** | ||
99 | * Client asked to resolve an address. Process the request. | ||
100 | * | ||
101 | * @param cls unused | ||
102 | * @param client the client | ||
103 | * @param message the resolution request | ||
104 | */ | ||
105 | void | ||
106 | GST_clients_handle_address_lookup (void *cls, | ||
107 | struct GNUNET_SERVER_Client *client, | ||
108 | const struct GNUNET_MessageHeader *message) | ||
109 | { | ||
110 | } | ||
111 | |||
112 | |||
113 | /** | ||
114 | * Client asked to obtain information about a peer's addresses. | ||
115 | * Process the request. | ||
116 | * | ||
117 | * @param cls unused | ||
118 | * @param client the client | ||
119 | * @param message the peer address information request | ||
120 | */ | ||
121 | void | ||
122 | GST_clients_handle_peer_address_lookup (void *cls, | ||
123 | struct GNUNET_SERVER_Client *client, | ||
124 | const struct GNUNET_MessageHeader *message) | ||
125 | { | ||
126 | } | ||
127 | |||
128 | |||
129 | /** | ||
130 | * Client asked to obtain information about all addresses. | ||
131 | * Process the request. | ||
132 | * | ||
133 | * @param cls unused | ||
134 | * @param client the client | ||
135 | * @param message the peer address information request | ||
136 | */ | ||
137 | void | ||
138 | GST_clients_handle_address_iterate (void *cls, | ||
139 | struct GNUNET_SERVER_Client *client, | ||
140 | const struct GNUNET_MessageHeader *message) | ||
141 | { | ||
142 | } | ||
143 | |||
144 | |||
50 | /** | 145 | /** |
51 | * Broadcast the given message to all of our clients. | 146 | * Broadcast the given message to all of our clients. |
52 | * | 147 | * |
53 | * @param msg message to broadcast | 148 | * @param msg message to broadcast |
149 | * @param candrop GNUNET_YES if the message can be dropped | ||
54 | */ | 150 | */ |
55 | void | 151 | void |
56 | GST_clients_broadcast (const struct GNUNET_MessageHeader *msg) | 152 | GST_clients_broadcast (const struct GNUNET_MessageHeader *msg, |
153 | int candrop) | ||
57 | { | 154 | { |
58 | 155 | ||
59 | } | 156 | } |
60 | 157 | ||
61 | 158 | ||
159 | /** | ||
160 | * Send the given message to a particular client | ||
161 | * | ||
162 | * @param client target of the message | ||
163 | * @param msg message to transmit | ||
164 | * @param candrop GNUNET_YES if the message can be dropped | ||
165 | */ | ||
166 | void | ||
167 | GST_clients_unicast (struct GNUNET_SERVER_Client *client, | ||
168 | const struct GNUNET_MessageHeader *msg, | ||
169 | int candrop) | ||
170 | { | ||
171 | } | ||
172 | |||
173 | |||
62 | /* end of file gnunet-service-transport_clients.c */ | 174 | /* end of file gnunet-service-transport_clients.c */ |