Gio.Socket.listen

### Method

# Gio Socketlisten

since: 2.22

#### Declaration [src]

    gboolean
    g_socket_listen (
      GSocket* socket
      GError** error
    )

#### Description [src]

Marks the socket as a server socket, i.e. a socket that is used to accept incoming requests using g_socket_accept().

Before calling this the socket must be bound to a local address using g_socket_bind().

To set the maximum amount of outstanding clients, use g_socket_set_listen_backlog().

Available since: 2.22

#### Return value

Type: `gboolean`

`TRUE` on success, `FALSE` on error.