Added send/receive functions for more efficient binary input/output.