When I sent the int to myself, yes, I did serialize it with htonl & ntohl, and yes, I now see why sending an std::string was so silly...and I do know about .c_str(), I just wanted to see if I could send it.
Btw - wasn't talking about just sending a structure, I thought putting the two ints it was comprised of into network byte-order (that's big-endian, right?) and then sending the structure might work, provided the same structure was on the other end?
As for casting my int in network byte-order as char* (because that's all the function would accept), it did work...I don't see why it shouldn't, as long as when I receive the data on the other end I cast it back to int and put it in host byte-order, right?
Read some of the C++ FAQ Lite and found some other things on putting non-integers into byte order with unions.