1 /* gnet-2.0.vapi generated by lt-vapigen, do not modify. */
3 [CCode (cprefix = "G", lower_case_cprefix = "gnet_")]
6 [CCode (cheader_filename = "gnet.h")]
8 public weak string buffer;
9 public uint bytes_read;
10 public uint bytes_written;
11 public weak GNet.TcpSocketConnectAsyncID connect_id;
12 public weak GLib.MainContext context;
13 public weak GNet.ConnFunc func;
14 public weak string hostname;
15 public weak GNet.InetAddr inetaddr;
16 public weak GLib.IOChannel iochannel;
18 public weak GNet.TcpSocketNewAsyncID new_id;
21 public uint process_buffer_timeout;
23 public weak GLib.List read_queue;
24 public uint ref_count;
25 public uint ref_count_internal;
26 public weak GNet.TcpSocket socket;
28 public void* user_data;
30 public uint watch_flags;
31 public bool watch_readable;
32 public bool watch_writable;
33 public weak GLib.List write_queue;
36 [CCode (cheader_filename = "gnet.h")]
37 public class ConnEvent {
38 public weak string buffer;
40 public GNet.ConnEventType type;
43 [CCode (cheader_filename = "gnet.h")]
44 public class ConnHttp {
47 [CCode (cheader_filename = "gnet.h")]
48 public class ConnHttpEvent {
51 public GNet.ConnHttpEventType type;
54 [CCode (cheader_filename = "gnet.h")]
55 public class ConnHttpEventData {
56 public weak string buffer;
57 public ulong buffer_length;
58 public uint64 content_length;
59 public uint64 data_received;
61 public weak GNet.ConnHttpEvent parent;
64 [CCode (cheader_filename = "gnet.h")]
65 public class ConnHttpEventError {
66 public GNet.ConnHttpError code;
67 public weak string message;
69 public weak GNet.ConnHttpEvent parent;
72 [CCode (cheader_filename = "gnet.h")]
73 public class ConnHttpEventRedirect {
74 public bool auto_redirect;
75 public uint max_redirects;
76 public weak string new_location;
77 public uint num_redirects;
79 public weak GNet.ConnHttpEvent parent;
82 [CCode (cheader_filename = "gnet.h")]
83 public class ConnHttpEventResolved {
84 public weak GNet.InetAddr ia;
86 public weak GNet.ConnHttpEvent parent;
89 [CCode (cheader_filename = "gnet.h")]
90 public class ConnHttpEventResponse {
91 public weak string header_fields;
92 public weak string header_values;
94 public weak GNet.ConnHttpEvent parent;
95 public uint response_code;
98 [CCode (cheader_filename = "gnet.h")]
99 public class InetAddr {
102 [CCode (cheader_filename = "gnet.h")]
103 public class InetAddrGetNameAsyncID {
106 [CCode (cheader_filename = "gnet.h")]
107 public class InetAddrNewAsyncID {
110 [CCode (cheader_filename = "gnet.h")]
111 public class InetAddrNewListAsyncID {
114 [CCode (cheader_filename = "gnet.h")]
118 [CCode (cheader_filename = "gnet.h")]
119 public class McastSocket {
122 [CCode (cheader_filename = "gnet.h")]
126 [CCode (cheader_filename = "gnet.h")]
127 public class Server {
128 public weak GNet.ServerFunc func;
129 public weak GNet.InetAddr iface;
131 public uint ref_count;
132 public weak GNet.TcpSocket socket;
133 public void* user_data;
136 [CCode (cheader_filename = "gnet.h")]
137 public class TcpSocket {
140 [CCode (cheader_filename = "gnet.h")]
141 public class TcpSocketConnectAsyncID {
144 [CCode (cheader_filename = "gnet.h")]
145 public class TcpSocketNewAsyncID {
148 [CCode (cheader_filename = "gnet.h")]
150 public weak string fragment;
151 public weak string hostname;
152 public weak string path;
154 public weak string query;
155 public weak string scheme;
156 public weak string userinfo;
159 [CCode (cheader_filename = "gnet.h")]
160 public class UdpSocket {
163 [CCode (cheader_filename = "gnet.h")]
164 public class UnixSocket {
166 [CCode (cheader_filename = "gnet.h")]
167 public struct NetTOS {
169 [CCode (cprefix = "GNET_CONN_", has_type_id = "0", cheader_filename = "gnet.h")]
170 public enum ConnEventType {
180 [CCode (cprefix = "GNET_CONN_HTTP_ERROR_", has_type_id = "0", cheader_filename = "gnet.h")]
181 public enum ConnHttpError {
183 PROTOCOL_UNSUPPORTED,
186 [CCode (cprefix = "GNET_CONN_HTTP_", has_type_id = "0", cheader_filename = "gnet.h")]
187 public enum ConnHttpEventType {
197 [CCode (cprefix = "GNET_CONN_HTTP_FLAG_SKIP_HEADER_", has_type_id = "0", cheader_filename = "gnet.h")]
198 public enum ConnHttpHeaderFlags {
201 [CCode (cprefix = "GNET_CONN_HTTP_METHOD_", has_type_id = "0", cheader_filename = "gnet.h")]
202 public enum ConnHttpMethod {
206 [CCode (cprefix = "GNET_IO_ERROR_", cheader_filename = "gnet.h")]
207 public enum IOError {
213 [CCode (cprefix = "GIPV6_POLICY_", has_type_id = "0", cheader_filename = "gnet.h")]
214 public enum IPv6Policy {
220 [CCode (cprefix = "GNET_TOS_", has_type_id = "0", cheader_filename = "gnet.h")]
228 [CCode (cprefix = "GTCP_SOCKET_CONNECT_ASYNC_STATUS_", has_type_id = "0", cheader_filename = "gnet.h")]
229 public enum TcpSocketConnectAsyncStatus {
234 [CCode (cheader_filename = "gnet.h")]
235 public delegate void ConnFunc (GNet.Conn conn, GNet.ConnEvent event);
236 [CCode (cheader_filename = "gnet.h")]
237 public delegate void ConnHttpFunc (GNet.ConnHttp conn, GNet.ConnHttpEvent event);
238 [CCode (cheader_filename = "gnet.h")]
239 public delegate void InetAddrGetNameAsyncFunc (string hostname);
240 [CCode (cheader_filename = "gnet.h")]
241 public delegate void InetAddrNewAsyncFunc (GNet.InetAddr inetaddr);
242 [CCode (cheader_filename = "gnet.h")]
243 public delegate void InetAddrNewListAsyncFunc (GLib.List list);
244 [CCode (cheader_filename = "gnet.h")]
245 public delegate void ServerFunc (GNet.Server server, GNet.Conn conn);
246 [CCode (cheader_filename = "gnet.h")]
247 public delegate void TcpSocketAcceptFunc (GNet.TcpSocket server, GNet.TcpSocket client);
248 [CCode (cheader_filename = "gnet.h")]
249 public delegate void TcpSocketConnectAsyncFunc (GNet.TcpSocket socket, GNet.TcpSocketConnectAsyncStatus status);
250 [CCode (cheader_filename = "gnet.h")]
251 public delegate void TcpSocketNewAsyncFunc (GNet.TcpSocket socket);
252 [CCode (cheader_filename = "gnet.h")]
253 public const int INETADDR_MAX_LEN;
254 [CCode (cheader_filename = "gnet.h")]
255 public const int MD5_HASH_LENGTH;
256 [CCode (cheader_filename = "gnet.h")]
257 public const int SHA_HASH_LENGTH;
258 [CCode (cheader_filename = "gnet.h")]
259 public const int SOCKS_PORT;
260 [CCode (cheader_filename = "gnet.h")]
261 public const int SOCKS_VERSION;
262 [CCode (cheader_filename = "gnet.h")]
263 public static weak string base64_decode (string src, int srclen, int dstlenp);
264 [CCode (cheader_filename = "gnet.h")]
265 public static weak string base64_encode (string src, int srclen, int dstlenp, bool strict);
266 [CCode (cheader_filename = "gnet.h")]
267 public static int calcsize (string format);
268 [CCode (cheader_filename = "gnet.h")]
269 public static void conn_connect (GNet.Conn conn);
270 [CCode (cheader_filename = "gnet.h")]
271 public static void conn_delete (GNet.Conn conn);
272 [CCode (cheader_filename = "gnet.h")]
273 public static void conn_disconnect (GNet.Conn conn);
274 [CCode (cheader_filename = "gnet.h")]
275 public static void conn_http_cancel (GNet.ConnHttp conn);
276 [CCode (cheader_filename = "gnet.h")]
277 public static void conn_http_delete (GNet.ConnHttp conn);
278 [CCode (cheader_filename = "gnet.h")]
279 public static weak GNet.ConnHttp conn_http_new ();
280 [CCode (cheader_filename = "gnet.h")]
281 public static bool conn_http_run (GNet.ConnHttp conn, GNet.ConnHttpFunc func);
282 [CCode (cheader_filename = "gnet.h")]
283 public static void conn_http_run_async (GNet.ConnHttp conn, GNet.ConnHttpFunc func);
284 [CCode (cheader_filename = "gnet.h")]
285 public static bool conn_http_set_escaped_uri (GNet.ConnHttp conn, string uri);
286 [CCode (cheader_filename = "gnet.h")]
287 public static bool conn_http_set_header (GNet.ConnHttp conn, string field, string value, GNet.ConnHttpHeaderFlags flags);
288 [CCode (cheader_filename = "gnet.h")]
289 public static bool conn_http_set_main_context (GNet.ConnHttp conn, GLib.MainContext context);
290 [CCode (cheader_filename = "gnet.h")]
291 public static void conn_http_set_max_redirects (GNet.ConnHttp conn, uint num);
292 [CCode (cheader_filename = "gnet.h")]
293 public static bool conn_http_set_method (GNet.ConnHttp conn, GNet.ConnHttpMethod method, string post_data, ulong post_data_len);
294 [CCode (cheader_filename = "gnet.h")]
295 public static void conn_http_set_timeout (GNet.ConnHttp conn, uint timeout);
296 [CCode (cheader_filename = "gnet.h")]
297 public static bool conn_http_set_uri (GNet.ConnHttp conn, string uri);
298 [CCode (cheader_filename = "gnet.h")]
299 public static bool conn_http_set_user_agent (GNet.ConnHttp conn, string agent);
300 [CCode (cheader_filename = "gnet.h")]
301 public static bool conn_http_steal_buffer (GNet.ConnHttp conn, string buffer, ulong length);
302 [CCode (cheader_filename = "gnet.h")]
303 public static bool conn_is_connected (GNet.Conn conn);
304 [CCode (cheader_filename = "gnet.h")]
305 public static weak GNet.Conn conn_new (string hostname, int port, GNet.ConnFunc func);
306 [CCode (cheader_filename = "gnet.h")]
307 public static void conn_read (GNet.Conn conn);
308 [CCode (cheader_filename = "gnet.h")]
309 public static void conn_readline (GNet.Conn conn);
310 [CCode (cheader_filename = "gnet.h")]
311 public static void conn_readn (GNet.Conn conn, int length);
312 [CCode (cheader_filename = "gnet.h")]
313 public static void conn_ref (GNet.Conn conn);
314 [CCode (cheader_filename = "gnet.h")]
315 public static void conn_set_callback (GNet.Conn conn, GNet.ConnFunc func);
316 [CCode (cheader_filename = "gnet.h")]
317 public static bool conn_set_main_context (GNet.Conn conn, GLib.MainContext context);
318 [CCode (cheader_filename = "gnet.h")]
319 public static void conn_set_watch_error (GNet.Conn conn, bool enable);
320 [CCode (cheader_filename = "gnet.h")]
321 public static void conn_set_watch_readable (GNet.Conn conn, bool enable);
322 [CCode (cheader_filename = "gnet.h")]
323 public static void conn_set_watch_writable (GNet.Conn conn, bool enable);
324 [CCode (cheader_filename = "gnet.h")]
325 public static void conn_timeout (GNet.Conn conn, uint timeout);
326 [CCode (cheader_filename = "gnet.h")]
327 public static void conn_unref (GNet.Conn conn);
328 [CCode (cheader_filename = "gnet.h")]
329 public static void conn_write (GNet.Conn conn, string buffer, int length);
330 [CCode (cheader_filename = "gnet.h")]
331 public static void conn_write_direct (GNet.Conn conn, string buffer, int length, GLib.DestroyNotify buffer_destroy_cb);
332 [CCode (cname = "gnet_conn_new_inetaddr", cheader_filename = "gnet.h")]
333 public static weak GNet.Conn from_inetaddr (GNet.InetAddr inetaddr, GNet.ConnFunc func);
334 [CCode (cname = "gnet_conn_new_socket", cheader_filename = "gnet.h")]
335 public static weak GNet.Conn from_socket (GNet.TcpSocket socket, GNet.ConnFunc func);
336 [CCode (cheader_filename = "gnet.h")]
337 public static bool http_get (string url, string buffer, ulong length, uint response);
338 [CCode (cheader_filename = "gnet.h")]
339 public static weak GNet.InetAddr inetaddr_autodetect_internet_interface ();
340 [CCode (cheader_filename = "gnet.h")]
341 public static weak GNet.InetAddr inetaddr_clone (GNet.InetAddr inetaddr);
342 [CCode (cheader_filename = "gnet.h")]
343 public static void inetaddr_delete (GNet.InetAddr inetaddr);
344 [CCode (cheader_filename = "gnet.h")]
345 public static void inetaddr_delete_list (GLib.List list);
346 [CCode (cheader_filename = "gnet.h")]
347 public static bool inetaddr_equal (void* p1, void* p2);
348 [CCode (cheader_filename = "gnet.h")]
349 public static void inetaddr_get_bytes (GNet.InetAddr inetaddr, string buffer);
350 [CCode (cheader_filename = "gnet.h")]
351 public static weak string inetaddr_get_canonical_name (GNet.InetAddr inetaddr);
352 [CCode (cheader_filename = "gnet.h")]
353 public static weak GNet.InetAddr inetaddr_get_host_addr ();
354 [CCode (cheader_filename = "gnet.h")]
355 public static weak string inetaddr_get_host_name ();
356 [CCode (cheader_filename = "gnet.h")]
357 public static weak GNet.InetAddr inetaddr_get_interface_to (GNet.InetAddr inetaddr);
358 [CCode (cheader_filename = "gnet.h")]
359 public static weak GNet.InetAddr inetaddr_get_internet_interface ();
360 [CCode (cheader_filename = "gnet.h")]
361 public static int inetaddr_get_length (GNet.InetAddr inetaddr);
362 [CCode (cheader_filename = "gnet.h")]
363 public static weak string inetaddr_get_name (GNet.InetAddr inetaddr);
364 [CCode (cheader_filename = "gnet.h")]
365 public static weak GNet.InetAddrGetNameAsyncID inetaddr_get_name_async (GNet.InetAddr inetaddr, GNet.InetAddrGetNameAsyncFunc func, void* data);
366 [CCode (cheader_filename = "gnet.h")]
367 public static void inetaddr_get_name_async_cancel (GNet.InetAddrGetNameAsyncID id);
368 [CCode (cheader_filename = "gnet.h")]
369 public static weak GNet.InetAddrGetNameAsyncID inetaddr_get_name_async_full (GNet.InetAddr inetaddr, GNet.InetAddrGetNameAsyncFunc func, void* data, GLib.DestroyNotify notify, GLib.MainContext context, int priority);
370 [CCode (cheader_filename = "gnet.h")]
371 public static weak string inetaddr_get_name_nonblock (GNet.InetAddr inetaddr);
372 [CCode (cheader_filename = "gnet.h")]
373 public static int inetaddr_get_port (GNet.InetAddr inetaddr);
374 [CCode (cheader_filename = "gnet.h")]
375 public static uint inetaddr_hash (void* p);
376 [CCode (cheader_filename = "gnet.h")]
377 public static bool inetaddr_is_broadcast (GNet.InetAddr inetaddr);
378 [CCode (cheader_filename = "gnet.h")]
379 public static bool inetaddr_is_canonical (string hostname);
380 [CCode (cheader_filename = "gnet.h")]
381 public static bool inetaddr_is_internet (GNet.InetAddr inetaddr);
382 [CCode (cheader_filename = "gnet.h")]
383 public static bool inetaddr_is_internet_domainname (string name);
384 [CCode (cheader_filename = "gnet.h")]
385 public static bool inetaddr_is_ipv4 (GNet.InetAddr inetaddr);
386 [CCode (cheader_filename = "gnet.h")]
387 public static bool inetaddr_is_ipv6 (GNet.InetAddr inetaddr);
388 [CCode (cheader_filename = "gnet.h")]
389 public static bool inetaddr_is_loopback (GNet.InetAddr inetaddr);
390 [CCode (cheader_filename = "gnet.h")]
391 public static bool inetaddr_is_multicast (GNet.InetAddr inetaddr);
392 [CCode (cheader_filename = "gnet.h")]
393 public static bool inetaddr_is_private (GNet.InetAddr inetaddr);
394 [CCode (cheader_filename = "gnet.h")]
395 public static bool inetaddr_is_reserved (GNet.InetAddr inetaddr);
396 [CCode (cheader_filename = "gnet.h")]
397 public static weak GLib.List inetaddr_list_interfaces ();
398 [CCode (cheader_filename = "gnet.h")]
399 public static weak GNet.InetAddr inetaddr_new (string hostname, int port);
400 [CCode (cheader_filename = "gnet.h")]
401 public static weak GNet.InetAddrNewAsyncID inetaddr_new_async (string hostname, int port, GNet.InetAddrNewAsyncFunc func, void* data);
402 [CCode (cheader_filename = "gnet.h")]
403 public static void inetaddr_new_async_cancel (GNet.InetAddrNewAsyncID id);
404 [CCode (cheader_filename = "gnet.h")]
405 public static weak GNet.InetAddrNewAsyncID inetaddr_new_async_full (string hostname, int port, GNet.InetAddrNewAsyncFunc func, void* data, GLib.DestroyNotify notify, GLib.MainContext context, int priority);
406 [CCode (cheader_filename = "gnet.h")]
407 public static weak GNet.InetAddr inetaddr_new_bytes (string bytes, uint length);
408 [CCode (cheader_filename = "gnet.h")]
409 public static weak GLib.List inetaddr_new_list (string hostname, int port);
410 [CCode (cheader_filename = "gnet.h")]
411 public static weak GNet.InetAddrNewListAsyncID inetaddr_new_list_async (string hostname, int port, GNet.InetAddrNewListAsyncFunc func, void* data);
412 [CCode (cheader_filename = "gnet.h")]
413 public static void inetaddr_new_list_async_cancel (GNet.InetAddrNewListAsyncID id);
414 [CCode (cheader_filename = "gnet.h")]
415 public static weak GNet.InetAddrNewListAsyncID inetaddr_new_list_async_full (string hostname, int port, GNet.InetAddrNewListAsyncFunc func, void* data, GLib.DestroyNotify notify, GLib.MainContext context, int priority);
416 [CCode (cheader_filename = "gnet.h")]
417 public static weak GNet.InetAddr inetaddr_new_nonblock (string hostname, int port);
418 [CCode (cheader_filename = "gnet.h")]
419 public static bool inetaddr_noport_equal (void* p1, void* p2);
420 [CCode (cheader_filename = "gnet.h")]
421 public static void inetaddr_ref (GNet.InetAddr inetaddr);
422 [CCode (cheader_filename = "gnet.h")]
423 public static void inetaddr_set_bytes (GNet.InetAddr inetaddr, string bytes, int length);
424 [CCode (cheader_filename = "gnet.h")]
425 public static void inetaddr_set_port (GNet.InetAddr inetaddr, int port);
426 [CCode (cheader_filename = "gnet.h")]
427 public static void inetaddr_unref (GNet.InetAddr inetaddr);
428 [CCode (cheader_filename = "gnet.h")]
429 public static void init ();
430 [CCode (cheader_filename = "gnet.h")]
431 public static GNet.IOError io_channel_readline (GLib.IOChannel channel, string buffer, ulong length, ulong bytes_readp);
432 [CCode (cheader_filename = "gnet.h")]
433 public static GNet.IOError io_channel_readline_strdup (GLib.IOChannel channel, string bufferp, ulong bytes_readp);
434 [CCode (cheader_filename = "gnet.h")]
435 public static GNet.IOError io_channel_readn (GLib.IOChannel channel, void* buffer, ulong length, ulong bytes_readp);
436 [CCode (cheader_filename = "gnet.h")]
437 public static GNet.IOError io_channel_writen (GLib.IOChannel channel, void* buffer, ulong length, ulong bytes_writtenp);
438 [CCode (cheader_filename = "gnet.h")]
439 public static GNet.IPv6Policy ipv6_get_policy ();
440 [CCode (cheader_filename = "gnet.h")]
441 public static void ipv6_set_policy (GNet.IPv6Policy policy);
442 [CCode (cheader_filename = "gnet.h")]
443 public static void mcast_socket_delete (GNet.McastSocket socket);
444 [CCode (cheader_filename = "gnet.h")]
445 public static weak GLib.IOChannel mcast_socket_get_io_channel (GNet.McastSocket socket);
446 [CCode (cheader_filename = "gnet.h")]
447 public static weak GNet.InetAddr mcast_socket_get_local_inetaddr (GNet.McastSocket socket);
448 [CCode (cheader_filename = "gnet.h")]
449 public static int mcast_socket_get_ttl (GNet.McastSocket socket);
450 [CCode (cheader_filename = "gnet.h")]
451 public static bool mcast_socket_has_packet (GNet.McastSocket socket);
452 [CCode (cheader_filename = "gnet.h")]
453 public static int mcast_socket_is_loopback (GNet.McastSocket socket);
454 [CCode (cheader_filename = "gnet.h")]
455 public static int mcast_socket_join_group (GNet.McastSocket socket, GNet.InetAddr inetaddr);
456 [CCode (cheader_filename = "gnet.h")]
457 public static int mcast_socket_leave_group (GNet.McastSocket socket, GNet.InetAddr inetaddr);
458 [CCode (cheader_filename = "gnet.h")]
459 public static weak GNet.McastSocket mcast_socket_new ();
460 [CCode (cheader_filename = "gnet.h")]
461 public static weak GNet.McastSocket mcast_socket_new_full (GNet.InetAddr iface, int port);
462 [CCode (cheader_filename = "gnet.h")]
463 public static weak GNet.McastSocket mcast_socket_new_with_port (int port);
464 [CCode (cheader_filename = "gnet.h")]
465 public static int mcast_socket_receive (GNet.McastSocket socket, string buffer, int length, out weak GNet.InetAddr src);
466 [CCode (cheader_filename = "gnet.h")]
467 public static void mcast_socket_ref (GNet.McastSocket socket);
468 [CCode (cheader_filename = "gnet.h")]
469 public static int mcast_socket_send (GNet.McastSocket socket, string buffer, int length, GNet.InetAddr dst);
470 [CCode (cheader_filename = "gnet.h")]
471 public static int mcast_socket_set_loopback (GNet.McastSocket socket, bool enable);
472 [CCode (cheader_filename = "gnet.h")]
473 public static int mcast_socket_set_ttl (GNet.McastSocket socket, int ttl);
474 [CCode (cheader_filename = "gnet.h")]
475 public static void mcast_socket_unref (GNet.McastSocket socket);
476 [CCode (cheader_filename = "gnet.h")]
477 public static weak GNet.MD5 md5_clone (GNet.MD5 md5);
478 [CCode (cheader_filename = "gnet.h")]
479 public static void md5_copy_string (GNet.MD5 md5, string buffer);
480 [CCode (cheader_filename = "gnet.h")]
481 public static void md5_delete (GNet.MD5 md5);
482 [CCode (cheader_filename = "gnet.h")]
483 public static bool md5_equal (void* p1, void* p2);
484 [CCode (cheader_filename = "gnet.h")]
485 public static void md5_final (GNet.MD5 md5);
486 [CCode (cheader_filename = "gnet.h")]
487 public static weak string md5_get_digest (GNet.MD5 md5);
488 [CCode (cheader_filename = "gnet.h")]
489 public static weak string md5_get_string (GNet.MD5 md5);
490 [CCode (cheader_filename = "gnet.h")]
491 public static uint md5_hash (void* p);
492 [CCode (cheader_filename = "gnet.h")]
493 public static weak GNet.MD5 md5_new (string buffer, uint length);
494 [CCode (cheader_filename = "gnet.h")]
495 public static weak GNet.MD5 md5_new_incremental ();
496 [CCode (cheader_filename = "gnet.h")]
497 public static weak GNet.MD5 md5_new_string (string str);
498 [CCode (cheader_filename = "gnet.h")]
499 public static void md5_update (GNet.MD5 md5, string buffer, uint length);
500 [CCode (cheader_filename = "gnet.h")]
501 public static int pack (string format, string buffer, int length);
502 [CCode (cheader_filename = "gnet.h")]
503 public static int pack_strdup (string format, string bufferp);
504 [CCode (cheader_filename = "gnet.h")]
505 public static void server_delete (GNet.Server server);
506 [CCode (cheader_filename = "gnet.h")]
507 public static weak GNet.Server server_new (GNet.InetAddr iface, int port, GNet.ServerFunc func);
508 [CCode (cheader_filename = "gnet.h")]
509 public static void server_ref (GNet.Server server);
510 [CCode (cheader_filename = "gnet.h")]
511 public static void server_unref (GNet.Server server);
512 [CCode (cheader_filename = "gnet.h")]
513 public static weak GNet.SHA sha_clone (GNet.SHA sha);
514 [CCode (cheader_filename = "gnet.h")]
515 public static void sha_copy_string (GNet.SHA sha, string buffer);
516 [CCode (cheader_filename = "gnet.h")]
517 public static void sha_delete (GNet.SHA sha);
518 [CCode (cheader_filename = "gnet.h")]
519 public static bool sha_equal (void* p1, void* p2);
520 [CCode (cheader_filename = "gnet.h")]
521 public static void sha_final (GNet.SHA sha);
522 [CCode (cheader_filename = "gnet.h")]
523 public static weak string sha_get_digest (GNet.SHA sha);
524 [CCode (cheader_filename = "gnet.h")]
525 public static weak string sha_get_string (GNet.SHA sha);
526 [CCode (cheader_filename = "gnet.h")]
527 public static uint sha_hash (void* p);
528 [CCode (cheader_filename = "gnet.h")]
529 public static weak GNet.SHA sha_new (string buffer, uint length);
530 [CCode (cheader_filename = "gnet.h")]
531 public static weak GNet.SHA sha_new_incremental ();
532 [CCode (cheader_filename = "gnet.h")]
533 public static weak GNet.SHA sha_new_string (string str);
534 [CCode (cheader_filename = "gnet.h")]
535 public static void sha_update (GNet.SHA sha, string buffer, uint length);
536 [CCode (cheader_filename = "gnet.h")]
537 public static weak GNet.TcpSocket tcp_socket_connect (string hostname, int port);
538 [CCode (cheader_filename = "gnet.h")]
539 public static weak GNet.TcpSocketConnectAsyncID tcp_socket_connect_async (string hostname, int port, GNet.TcpSocketConnectAsyncFunc func, void* data);
540 [CCode (cheader_filename = "gnet.h")]
541 public static void tcp_socket_connect_async_cancel (GNet.TcpSocketConnectAsyncID id);
542 [CCode (cheader_filename = "gnet.h")]
543 public static weak GNet.TcpSocketConnectAsyncID tcp_socket_connect_async_full (string hostname, int port, GNet.TcpSocketConnectAsyncFunc func, void* data, GLib.DestroyNotify notify, GLib.MainContext context, int priority);
544 [CCode (cheader_filename = "gnet.h")]
545 public static void tcp_socket_delete (GNet.TcpSocket socket);
546 [CCode (cheader_filename = "gnet.h")]
547 public static weak GLib.IOChannel tcp_socket_get_io_channel (GNet.TcpSocket socket);
548 [CCode (cheader_filename = "gnet.h")]
549 public static weak GNet.InetAddr tcp_socket_get_local_inetaddr (GNet.TcpSocket socket);
550 [CCode (cheader_filename = "gnet.h")]
551 public static int tcp_socket_get_port (GNet.TcpSocket socket);
552 [CCode (cheader_filename = "gnet.h")]
553 public static weak GNet.InetAddr tcp_socket_get_remote_inetaddr (GNet.TcpSocket socket);
554 [CCode (cheader_filename = "gnet.h")]
555 public static weak GNet.TcpSocket tcp_socket_new (GNet.InetAddr addr);
556 [CCode (cheader_filename = "gnet.h")]
557 public static weak GNet.TcpSocketNewAsyncID tcp_socket_new_async (GNet.InetAddr addr, GNet.TcpSocketNewAsyncFunc func, void* data);
558 [CCode (cheader_filename = "gnet.h")]
559 public static void tcp_socket_new_async_cancel (GNet.TcpSocketNewAsyncID id);
560 [CCode (cheader_filename = "gnet.h")]
561 public static weak GNet.TcpSocketNewAsyncID tcp_socket_new_async_direct (GNet.InetAddr addr, GNet.TcpSocketNewAsyncFunc func, void* data);
562 [CCode (cheader_filename = "gnet.h")]
563 public static weak GNet.TcpSocketNewAsyncID tcp_socket_new_async_direct_full (GNet.InetAddr addr, GNet.TcpSocketNewAsyncFunc func, void* data, GLib.DestroyNotify notify, GLib.MainContext context, int priority);
564 [CCode (cheader_filename = "gnet.h")]
565 public static weak GNet.TcpSocketNewAsyncID tcp_socket_new_async_full (GNet.InetAddr addr, GNet.TcpSocketNewAsyncFunc func, void* data, GLib.DestroyNotify notify, GLib.MainContext context, int priority);
566 [CCode (cheader_filename = "gnet.h")]
567 public static weak GNet.TcpSocket tcp_socket_new_direct (GNet.InetAddr addr);
568 [CCode (cheader_filename = "gnet.h")]
569 public static void tcp_socket_ref (GNet.TcpSocket socket);
570 [CCode (cheader_filename = "gnet.h")]
571 public static weak GNet.TcpSocket tcp_socket_server_accept (GNet.TcpSocket socket);
572 [CCode (cheader_filename = "gnet.h")]
573 public static void tcp_socket_server_accept_async (GNet.TcpSocket socket, GNet.TcpSocketAcceptFunc accept_func);
574 [CCode (cheader_filename = "gnet.h")]
575 public static void tcp_socket_server_accept_async_cancel (GNet.TcpSocket socket);
576 [CCode (cheader_filename = "gnet.h")]
577 public static weak GNet.TcpSocket tcp_socket_server_accept_nonblock (GNet.TcpSocket socket);
578 [CCode (cheader_filename = "gnet.h")]
579 public static weak GNet.TcpSocket tcp_socket_server_new ();
580 [CCode (cheader_filename = "gnet.h")]
581 public static weak GNet.TcpSocket tcp_socket_server_new_full (GNet.InetAddr iface, int port);
582 [CCode (cheader_filename = "gnet.h")]
583 public static weak GNet.TcpSocket tcp_socket_server_new_with_port (int port);
584 [CCode (cheader_filename = "gnet.h")]
585 public static void tcp_socket_set_tos (GNet.TcpSocket socket, GNet.NetTOS tos);
586 [CCode (cheader_filename = "gnet.h")]
587 public static void tcp_socket_unref (GNet.TcpSocket socket);
588 [CCode (cheader_filename = "gnet.h")]
589 public static void udp_socket_delete (GNet.UdpSocket socket);
590 [CCode (cheader_filename = "gnet.h")]
591 public static weak GLib.IOChannel udp_socket_get_io_channel (GNet.UdpSocket socket);
592 [CCode (cheader_filename = "gnet.h")]
593 public static weak GNet.InetAddr udp_socket_get_local_inetaddr (GNet.UdpSocket socket);
594 [CCode (cheader_filename = "gnet.h")]
595 public static int udp_socket_get_ttl (GNet.UdpSocket socket);
596 [CCode (cheader_filename = "gnet.h")]
597 public static bool udp_socket_has_packet (GNet.UdpSocket socket);
598 [CCode (cheader_filename = "gnet.h")]
599 public static weak GNet.UdpSocket udp_socket_new ();
600 [CCode (cheader_filename = "gnet.h")]
601 public static weak GNet.UdpSocket udp_socket_new_full (GNet.InetAddr iface, int port);
602 [CCode (cheader_filename = "gnet.h")]
603 public static weak GNet.UdpSocket udp_socket_new_with_port (int port);
604 [CCode (cheader_filename = "gnet.h")]
605 public static int udp_socket_receive (GNet.UdpSocket socket, string buffer, int length, out weak GNet.InetAddr src);
606 [CCode (cheader_filename = "gnet.h")]
607 public static void udp_socket_ref (GNet.UdpSocket socket);
608 [CCode (cheader_filename = "gnet.h")]
609 public static int udp_socket_send (GNet.UdpSocket socket, string buffer, int length, GNet.InetAddr dst);
610 [CCode (cheader_filename = "gnet.h")]
611 public static int udp_socket_set_ttl (GNet.UdpSocket socket, int ttl);
612 [CCode (cheader_filename = "gnet.h")]
613 public static void udp_socket_unref (GNet.UdpSocket socket);
614 [CCode (cheader_filename = "gnet.h")]
615 public static void unix_socket_delete (GNet.UnixSocket socket);
616 [CCode (cheader_filename = "gnet.h")]
617 public static weak GLib.IOChannel unix_socket_get_io_channel (GNet.UnixSocket socket);
618 [CCode (cheader_filename = "gnet.h")]
619 public static weak string unix_socket_get_path (GNet.UnixSocket socket);
620 [CCode (cheader_filename = "gnet.h")]
621 public static weak GNet.UnixSocket unix_socket_new (string path);
622 [CCode (cheader_filename = "gnet.h")]
623 public static weak GNet.UnixSocket unix_socket_new_abstract (string path);
624 [CCode (cheader_filename = "gnet.h")]
625 public static void unix_socket_ref (GNet.UnixSocket socket);
626 [CCode (cheader_filename = "gnet.h")]
627 public static weak GNet.UnixSocket unix_socket_server_accept (GNet.UnixSocket socket);
628 [CCode (cheader_filename = "gnet.h")]
629 public static weak GNet.UnixSocket unix_socket_server_accept_nonblock (GNet.UnixSocket socket);
630 [CCode (cheader_filename = "gnet.h")]
631 public static weak GNet.UnixSocket unix_socket_server_new (string path);
632 [CCode (cheader_filename = "gnet.h")]
633 public static weak GNet.UnixSocket unix_socket_server_new_abstract (string path);
634 [CCode (cheader_filename = "gnet.h")]
635 public static void unix_socket_unref (GNet.UnixSocket socket);
636 [CCode (cheader_filename = "gnet.h")]
637 public static int unpack (string format, string buffer, int length);
638 [CCode (cheader_filename = "gnet.h")]
639 public static weak GNet.URI uri_clone (GNet.URI uri);
640 [CCode (cheader_filename = "gnet.h")]
641 public static void uri_delete (GNet.URI uri);
642 [CCode (cheader_filename = "gnet.h")]
643 public static bool uri_equal (void* p1, void* p2);
644 [CCode (cheader_filename = "gnet.h")]
645 public static void uri_escape (GNet.URI uri);
646 [CCode (cheader_filename = "gnet.h")]
647 public static weak string uri_get_string (GNet.URI uri);
648 [CCode (cheader_filename = "gnet.h")]
649 public static uint uri_hash (void* p);
650 [CCode (cheader_filename = "gnet.h")]
651 public static weak GNet.URI uri_new (string uri);
652 [CCode (cheader_filename = "gnet.h")]
653 public static weak GNet.URI uri_new_fields (string scheme, string hostname, int port, string path);
654 [CCode (cheader_filename = "gnet.h")]
655 public static weak GNet.URI uri_new_fields_all (string scheme, string userinfo, string hostname, int port, string path, string query, string fragment);
656 [CCode (cheader_filename = "gnet.h")]
657 public static bool uri_parse_inplace (GNet.URI guri, string uri, string hostname, ulong len);
658 [CCode (cheader_filename = "gnet.h")]
659 public static void uri_set_fragment (GNet.URI uri, string fragment);
660 [CCode (cheader_filename = "gnet.h")]
661 public static void uri_set_hostname (GNet.URI uri, string hostname);
662 [CCode (cheader_filename = "gnet.h")]
663 public static void uri_set_path (GNet.URI uri, string path);
664 [CCode (cheader_filename = "gnet.h")]
665 public static void uri_set_port (GNet.URI uri, int port);
666 [CCode (cheader_filename = "gnet.h")]
667 public static void uri_set_query (GNet.URI uri, string query);
668 [CCode (cheader_filename = "gnet.h")]
669 public static void uri_set_scheme (GNet.URI uri, string scheme);
670 [CCode (cheader_filename = "gnet.h")]
671 public static void uri_set_userinfo (GNet.URI uri, string userinfo);
672 [CCode (cheader_filename = "gnet.h")]
673 public static void uri_unescape (GNet.URI uri);
674 [CCode (cheader_filename = "gnet.h")]
675 public static int vcalcsize (string format, void* args);
676 [CCode (cheader_filename = "gnet.h")]
677 public static int vpack (string format, string buffer, int length, void* args);
678 [CCode (cheader_filename = "gnet.h")]
679 public static int vunpack (string format, string buffer, int length, void* args);