### Method

# Gio Socket connection_factory_create_connection

since: 2.22

#### Declaration

    GSocketConnection*
    g_socket_connection_factory_create_connection (
      GSocket* socket
    )

#### Description

Creates a `GSocketConnection` subclass of the right type for `socket`.

Available since: 2.22

#### Return value

Type: `GSocketConnection`

A `GSocketConnection`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.