autotools are dumb, so I'm also adding gnioenumtypes.{c,h}
[cascardo/gnio.git] / gnio / gsocket.h
index 625e24a..e1eca71 100644 (file)
@@ -71,7 +71,9 @@ typedef enum
 
 GType            g_socket_get_type           (void) G_GNUC_CONST;
 
-GSocket *        g_socket_new                (GSocketDomain domain, GSocketType type, const gchar *protocol, GError **error);
+GSocket *        g_socket_new                (GSocketDomain   domain,
+                                              GSocketType     type,
+                                              const gchar    *protocol);
 
 GSocket *        g_socket_new_from_fd        (gint fd);
 
@@ -84,6 +86,14 @@ void             g_socket_set_blocking       (GSocket  *socket,
 
 gboolean         g_socket_get_blocking       (GSocket  *socket);
 
+void             g_socket_set_reuse_address  (GSocket  *socket,
+                                              gboolean  reuse);
+
+gboolean         g_socket_get_reuse_address  (GSocket  *socket);
+
+gboolean         g_socket_has_error          (GSocket  *socket,
+                                              GError  **error);
+
 gboolean         g_socket_bind               (GSocket         *socket,
                                               GSocketAddress  *address,
                                               GError         **error);
@@ -95,8 +105,8 @@ gboolean         g_socket_connect            (GSocket         *socket,
 GSocket *        g_socket_accept             (GSocket       *socket,
                                               GError       **error);
 
-void             g_socket_listen             (GSocket *socket,
-                                              gint backlog);
+gboolean         g_socket_listen             (GSocket  *socket,
+                                              GError  **error);
 
 gssize           g_socket_receive            (GSocket       *socket,
                                               gchar         *buffer,
@@ -110,6 +120,10 @@ gssize           g_socket_send               (GSocket       *socket,
 
 void             g_socket_close              (GSocket *socket);
 
+GSource *        g_socket_create_source      (GSocket      *socket,
+                                              GIOCondition  condition,
+                                              GCancellable *cancellable);
+
 G_END_DECLS
 
 #endif /* G_SOCKET_H */