Close
Close is used to free a previously assigned socket object.
Syntax
Close
Returns
No data returned.
Example
This Script displays the banner of an ftp server that is running locally. It can work with any ftp server by changing the value of the variable "ip":
Function Main
Dim SocketObject As Object
Dim ip As String
Dim port As String
Dim strResponse As String
Ip = "127.0.0.1"
Port = "21"
Socket.SetTimeout 5000,5000
Set SocketObject = Socket.OpenTcp(Ip,Port)
If Not SocketObject is Nothing Then
'check to see that the Object returned successfully
strResponse = SocketObject.Recv(1024)
echo(strResponse)
SocketObject.Close
End If
End Function