update send/recv/loopback functions.