X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=gnio%2Fgsocket.h;h=d28244c423bd3b7a33c150c75bf0b8524838d381;hb=f88a5d4f15e0bbed0746dab6778631ce44b856d0;hp=84e2ba93191a5d927fbd3b5f596037336be1b4a3;hpb=35e58f63beaf5467d9a2bac6f053ff86fd6eb36c;p=cascardo%2Fgnio.git diff --git a/gnio/gsocket.h b/gnio/gsocket.h index 84e2ba9..d28244c 100644 --- a/gnio/gsocket.h +++ b/gnio/gsocket.h @@ -27,8 +27,7 @@ #include #include -#include "ginetaddress.h" -#include "gsocketaddress.h" +#include G_BEGIN_DECLS @@ -71,7 +70,10 @@ 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, + GError **error); GSocket * g_socket_new_from_fd (gint fd); @@ -84,6 +86,11 @@ 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_bind (GSocket *socket, GSocketAddress *address, GError **error); @@ -95,7 +102,8 @@ gboolean g_socket_connect (GSocket *socket, GSocket * g_socket_accept (GSocket *socket, GError **error); -void g_socket_listen (GSocket *socket); +gboolean g_socket_listen (GSocket *socket, + GError **error); gssize g_socket_receive (GSocket *socket, gchar *buffer, @@ -109,6 +117,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 */