Connect to a server.
IP address of the host. Either a dotted IP address or a domain name.
The port on the remote machine to connect to.
Optional password for the server.
Event to send in case of an error connecting to the server.
Store the error string in a variable.