server connect and structure