pac: replace stream operations with send()