### Method

# Gio SocketListener accept_socket_async

since: 2.22

#### Declaration [src]

    void
    g_socket_listener_accept_socket_async (
      GSocketListener* listener,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

This is the asynchronous version of g_socket_listener_accept_socket().

When the operation is finished `callback` will be called. You can then call `g_socket_listener_accept_socket_finish()` to get the result of the operation.

Available since: 2.22

This method completes asynchronously. Use `g_socket_listener_accept_socket_finish()` inside the `GAsyncReadyCallback` to obtain the result of the operation.

#### Parameters

`cancellable`

  Type: `GCancellable`

  A `GCancellable`, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`callback`

  Type: `GAsyncReadyCallback`

  A `GAsyncReadyCallback`.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  User data for the callback.

  The argument can be `NULL`.
  The data is owned by the caller of the method.