To start a connection to the message server specified in the constructor, connect() method is used.
connect() will return true if the connection is successful, false otherwise.
Once connection is established you can send an receive message.
To stop connection disconnect() method is provided.