finish server socket part except temp open logic