X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Ftests%2Fsend-data.c;h=189aed27df6f7f9a463b492887765295c12bd3e1;hb=16bafb479995e69417b86b5b26682ec7c2ceb5a0;hp=a2592ceefc1bec0b6c39354e1780783b6732c4e6;hpb=28a4fff7ec63000238c7e20ff965238027922c47;p=platform%2Fupstream%2Fglib.git diff --git a/gio/tests/send-data.c b/gio/tests/send-data.c index a2592ce..189aed2 100644 --- a/gio/tests/send-data.c +++ b/gio/tests/send-data.c @@ -5,6 +5,7 @@ GMainLoop *loop; int cancel_timeout = 0; +int io_timeout = 0; gboolean async = FALSE; gboolean graceful = FALSE; static GOptionEntry cmd_entries[] = { @@ -14,6 +15,8 @@ static GOptionEntry cmd_entries[] = { "Use async ops", NULL}, {"graceful-disconnect", 'g', 0, G_OPTION_ARG_NONE, &graceful, "Use graceful disconnect", NULL}, + {"timeout", 't', 0, G_OPTION_ARG_INT, &io_timeout, + "Time out socket I/O after the specified number of seconds", NULL}, {NULL} }; @@ -97,6 +100,8 @@ main (int argc, char *argv[]) } client = g_socket_client_new (); + if (io_timeout) + g_socket_client_set_timeout (client, io_timeout); if (async) {