Wait for socket to exists in server