oss_src/sframe/spark_unity.cpp
void write_msg(const char* buffer, size_t bufferLen) {
  // Write the message length as a signed int
  // guard against integer wrap around for large arrays
  assert(bufferLen <= std::numeric_limits<uint32_t>::max()); 
  uint32_t msgLen = bufferLen;
  std::cout.write(reinterpret_cast<char*>(&msgLen), sizeof(uint32_t));
  // Write the message bytes
  std::cout.write(buffer, msgLen);
  if (!std::cout.good()) {
    log_and_throw("Fail writing to standard output");
  }
}
/**
 * Write a message to standard out in binary format encoded in the format:
 * message length (4 bytes) followed by bytes
 */
Write a message to standard out in binary format encoded in the format:
message length (4 bytes) followed by bytes
Write a message to standard out in binary format encoded in the format : message length ( 4 bytes ) followed by bytes
void write_msg(const char* buffer, size_t bufferLen) {
  assert(bufferLen <= std::numeric_limits<uint32_t>::max()); 
  uint32_t msgLen = bufferLen;
  std::cout.write(reinterpret_cast<char*>(&msgLen), sizeof(uint32_t));
  std::cout.write(buffer, msgLen);
  if (!std::cout.good()) {
    log_and_throw("Fail writing to standard output");
  }
}
void write_msg ( const char * buffer , size_t bufferLen ) { assert ( bufferLen <= std :: numeric_limits < uint32_t > :: max ( ) ) ; uint32_t msgLen = bufferLen ; std :: cout . write ( reinterpret_cast < char * > ( & msgLen ) , sizeof ( uint32_t ) ) ; std :: cout . write ( buffer , msgLen ) ; if ( ! std :: cout . good ( ) ) { log_and_throw ( " " ) ; } }
Write a message to standard out in binary format encoded in the format:
 message length (4 bytes) followed by bytes
Write a message to standard out in binary format encoded in the format : message length ( 4 bytes ) followed by bytes
// Write the message length as a signed int // guard against integer wrap around for large arrays // Write the message bytes