send/recv loops