use bytebuffers for sendrecv