Internet Direct (Indy)
|
Creates a new socket handle that is bound to specific socket type and protocol.
function NewSocketHandle( const ASocketType: TIdSocketType; const AProtocol: TIdSocketProtocol; const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION; const AOverlapped: Boolean = False ): TIdStackSocketHandle; override;
Parameters |
Description |
ASocketType |
Socket type (stream or datagram). |
AProtocol |
Protocol to use for the socket handle. |
AIPVersion |
IP address family for the IP address. |
AOverlapped |
Indicates overlapped IO is permitted on the socket handle. |
TIdStackSocketHandle - Socket handle created with the specified attributes,
NewSocketHandle is an overridden TIdStackSocketHandle function that implements the method used to access the Socket() API for the protocol stack implementation.
ASocketType indicates the TIdSocketType value to use as the socket type for the newly created socket handle.
AProtocol indicates the TIdSocketProtocol value to use as the protocol for the newly created socket handle.
AOverlapped indicates that overlapped IO operations are permitted on the socket handle.
NewSocketHandle checks that the socket handle does not contain an invalid value, and sets the return value to the newly created socket handle.
For stream sockets, call Connect before reading or writing with the socket handle. Call Disconnect to close the connection on the socket handle.
For datagram sockets, use SendTo or ReceiveFrom to send or receive datagrams. If Connect is called for a datagram socket, use Send and Receive to send or receive datagrams.
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. |