Set up server socket and connection loop