No socket exists for sending

If the error message “No socket exists for sending” is found in the LastErrorText, it means that the component is not connected to the server. For example, if Ftp2.PutFile is called to upload a file, but Ftp2.Connect is never called to establish the connection, the “No socket exists for sending” would be found in the LastErrorText. Another possibility is that Connect was called, but the success/failure return value was never checked to see if it actually succeeded. Or perhaps the Connect succeeded, but at some point after a method which communicates with the server failed and the connection was lost. It’s extremely important to check the success/failure return value of any method that communicates with a server.