torch/lib/c10d/Utils.hpp
// send a string's length and data
send a string's length and data
send a string ' s length and data
inline void sendString(
    int socket,
    const std::string& str,
    bool moreData = false) {
  SizeType size = str.size();
  sendBytes<SizeType>(socket, &size, 1, true);
  sendBytes<char>(socket, str.data(), size, moreData);
}
inline void sendString ( int socket , const std :: string & str , bool moreData = false ) { SizeType size = str . size ( ) ; sendBytes < SizeType > ( socket , & size , 1 , true ) ; sendBytes < char > ( socket , str . data ( ) , size , moreData ) ; }
send a string's length and data
send a string ' s length and data