Internet Direct (Indy) Version 9.0.2 Beta
TIdStack.CreateSocketHandle
Creates a new socket descriptor.

function CreateSocketHandle(const ASocketType: Integer; const AProtocol: Integer): TIdStackSocketHandle;
Parameters
const ASocketType: Integer
Socket type for the descriptor.

const AProtocol: Integer = Id_IPPROTO_IP
Protocol family for the descriptor. Default value is Id_IPPROTO_IP.

Returns
TIdStackSocketHandle - Newly created socket descriptor.

Description
CreateSocketHandle is a TIdStackSocketHandle function that create a new socket descriptor using the socket type specifies in AScoketType and the protocol family specified in AProtocol.

On the Windows platform, CreateSocketHandle calls the WSSocket function. If an error occurs while creating the new socket descriptor, an EIdInvalidSocket exception is raised.