refactored FlashPolicySocket