Ejemplo n.º 1
0
Archivo: ui.c Proyecto: automata/imgflo
static void
on_web_socket_open(SoupWebsocketConnection *ws, gpointer user_data)
{
	gchar *url = soup_uri_to_string(soup_websocket_connection_get_uri (ws), FALSE);
	g_print("WebSocket: client opened %s with %s\n", soup_websocket_connection_get_protocol(ws), url);

    UiConnection *self = (UiConnection *)user_data;
    g_assert(self);
    self->connection = ws;

	g_free(url);
}
Ejemplo n.º 2
0
Archivo: ui.c Proyecto: imgflo/imgflo
static void
on_web_socket_open(SoupWebsocketConnection *ws, gpointer user_data)
{
    SoupURI *uri = soup_websocket_connection_get_uri(ws);
	gchar *url = soup_uri_to_string(uri, FALSE);

	imgflo_debug("WebSocket: client opened %s with %s\n", soup_websocket_connection_get_protocol(ws), url);

    UiConnection *self = (UiConnection *)user_data;
    g_assert(self);
    ensure_hostname_set(self, uri);
    self->connection = g_object_ref(ws);

	g_free(url);
}