Checks the existence of socket.
- To check the connection validity, use SocketClientInfo to check the IP address of client socket and the port number.
- The socket exists as long as the created socket was not closed by SocketClose.
- If the communication is interrupted, SocketExist may still return a positive result even if the dialog is stopped.
// Check the existence before the creation
IF SocketExist("MySocket") = False THEN
IF SocketCreate("MySocket", 8000) = False THEN
Error("Creation error" + ErrorInfo(errMessage))
<Result> = SocketExist(<Socket name>)
- True if the socket exists,
- False otherwise.
<Socket name>: Character string
Name of socket to check.
For a WINDEV application, this name was defined:
Caution: the socket name is case sensitive.
The call to this function modifies the permissions required by the application.
Required permission : INTERNET
This permission allows the applications to open the network sockets.