SocketCore.Close

From Xojo Documentation

Method

SocketCore.Close()

Supported for all project types and targets.

Closes the socket’s connection, closes any connections the socket may have, and resets the socket.

Notes

The only information that is retained after calling Close is the socket’s port, address (in the case of TCPSockets), LastErrorCode properties, and data left in the socket’s receive buffer. All other information is discarded.

Example

This example closes the EasyTCPSockets that were open. The sockets were added to the main window.

Connector.Close
Listener.Close