I have a working code for connection. However, connection to server is
unstable. Need for reboot all the time.