GInputStream *istream;
GOutputStream *ostream;
- g_thread_init (NULL);
-
- g_type_init ();
-
context = g_option_context_new (" - Test GSocket server stuff");
g_option_context_add_main_entries (context, cmd_entries, NULL);
if (!g_option_context_parse (context, &argc, &argv, &error))
if (cancel_timeout)
{
+ GThread *thread;
cancellable = g_cancellable_new ();
- g_thread_create (cancel_thread, cancellable, FALSE, NULL);
+ thread = g_thread_new ("cancel", cancel_thread, cancellable);
+ g_thread_unref (thread);
}
else
{
if (tlscert)
{
- GTlsServerConnection *tls_conn;
+ GIOStream *tls_conn;
tls_conn = g_tls_server_connection_new (connection, tlscert, &error);
if (!tls_conn)
}
g_object_unref (connection);
- connection = G_IO_STREAM (tls_conn);
+ connection = tls_conn;
}
if (connection)