to connect with chatServer