summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-05-08 19:25:39 (GMT)
committerAlexander Larsson <alexl@redhat.com>2009-05-08 19:25:39 (GMT)
commitda15109b0f884083a80fc744dff82515d70a3e99 (patch)
tree602e1aa416e8745e6046466b3b846fbfa79bd027
parent8dad450f19b63d18c09ffa9db2f6ef6f2552e353 (diff)
downloadgnio-da15109b0f884083a80fc744dff82515d70a3e99.tar.gz
gnio-da15109b0f884083a80fc744dff82515d70a3e99.tar.xz
Use g_socket_client_connect_to_host instead of g_tcp_client_..
-rw-r--r--examples/client.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/client.c b/examples/client.c
index 87f83f7..e7c132c 100644
--- a/examples/client.c
+++ b/examples/client.c
@@ -2,11 +2,11 @@
static void
ready (GObject *obj,
- GAsyncResult *result,
- gpointer user_data)
+ GAsyncResult *result,
+ gpointer user_data)
{
- GTcpClient *client = G_TCP_CLIENT (obj);
- GTcpConnection *connection;
+ GSocketClient *client = G_SOCKET_CLIENT (obj);
+ GSocketConnection *connection;
GError *error = NULL;
GInputStream *input;
GOutputStream *output;
@@ -15,7 +15,7 @@ ready (GObject *obj,
char buffer[2048];
gssize bytes;
- connection = g_tcp_client_connect_finish (client, result, &error);
+ connection = g_socket_client_connect_finish (client, result, &error);
if (connection == NULL)
g_error ("connect: %s: %d, %s", g_quark_to_string (error->domain), error->code, error->message);
@@ -57,16 +57,16 @@ main (void)
{
GError *error = NULL;
GTcpConnection *connection;
- GTcpClient *client;
+ GSocketClient *client;
GInputStream *input;
char buffer[2048];
gssize bytes;
g_type_init ();
- client = g_tcp_client_new ();
- g_tcp_client_connect_to_host_async (client, "mail.desrt.ca",
- 143, NULL, ready, NULL);
+ client = g_socket_client_new ();
+ g_socket_client_connect_to_host_async (client, "mail.desrt.ca",
+ 143, NULL, ready, NULL);
g_main_loop_run (g_main_loop_new (NULL, FALSE));
g_error ("hi?");