Client: server connection in separated thread.