Pull out the socket from the api.