socket connection, first request and server reply