Internet Direct (Indy)
Home
PreviousUpNext
TIdSocketHandle.AllocateSocket Method

Creates a socket descriptor with the specified socket and protocol families.

Pascal
procedure AllocateSocket(
    const ASocketType: TIdSocketType = Id_SOCK_STREAM; 
    const AProtocol: TIdSocketProtocol = Id_IPPROTO_IP
);
Parameters 
Description 
ASocketType 
Socket family. Default is Id_SOCK_STREAM.
 
AProtocol 
Protocol family. Default is Id_IPPROTO_IP

AllocateSocket is a procedure used to creates a socket descriptor with the socket family and protocol family as indicated in ASocketType and AProtocol. 

ASocketType determines address family used for the connection, and indicates the valid protocol family options for the socket type. The following socket types are supported: 

 

 

AProtocol identifies the Internet protocol to be used for the given socket type. Only a single protocol exists to support a particular socket type using a given address format. The following protocol families are supported: 

 

 

The value in the Overlapped property indicates if overlapped IO operations are permitted for the socket descriptor. 

AllocateSocket calls CloseSocket to ensure that any previously allocated socket handle is disconnected and reset

AllocateSocket sets the Handle for the socket descriptor to the value created on the global protocol stack (GStack) using the values indicated in ASocketType, AProtocol, and OverLapped.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.