### Method

# Soup ServerMessage get_socket

#### Declaration [src]

    GSocket*
    soup_server_message_get_socket (
      SoupServerMessage* msg
    )

#### Description [src]

Retrieves the `GSocket` that `msg` is associated with.

If you are using this method to observe when multiple requests are made on the same persistent HTTP connection (eg, as the ntlm-test test program does), you will need to pay attention to socket destruction as well (eg, by using weak references), so that you do not get fooled when the allocator reuses the memory address of a previously-destroyed socket to represent a new socket.

#### Return value

Type: `GSocket`

The `GSocket` that `msg` is associated with, `NULL` if you used `soup_server_accept_iostream()`.

The data is owned by the instance.
The return value can be `NULL`.