# GetSocketListenerConnection

## Description

Returns the ID of a socket that has connected to your device. The listener will accept connections in the background and add them to a queue, this command removes one of the sockets from the queue and hands control of it to you. If you do not want to accept the connection you should delete it using DeleteSocket. You should call GetSocketListenerConnection in a loop until it returns 0 to be sure you have dealt with all connected sockets. You can find out the IP address of the device that connected to you by calling GetSocketRemoteIP on the returned socket.

## Definition

integer GetSocketListenerConnection( listenerID )

UINT agk::GetSocketListenerConnection( UINT listenerID )

## Parameters

- listenerID - The ID of the listener to check