following 2 poll methods are called from server_client