OK, never fails that I find a solution once I post a problem. If I use a stream rather than a datagram, it seems to work fine. So... for my education, how would I make this work with a datagram, if I insisted on doing it that way?