src/js/lib/RTRemoteTCPTransport.js
/**
   * send buffer to dest host
   * @param {Buffer} buffer the send buffer
   */
send buffer to dest host
@param {Buffer} buffer the send buffer
send buffer to dest host @param { Buffer } buffer the send buffer
send(buffer) {
    if (this.mRunning) {
      const sendBuff = Buffer.alloc(RTConst.PROTOCOL_HEADER_LEN + buffer.length);
      sendBuff.writeUInt32BE(buffer.length, 0); 
      sendBuff.fill(buffer, RTConst.PROTOCOL_HEADER_LEN); 
      this.socket.write(sendBuff, RTConst.DEFAULT_CHARSET); 
    } else {
      throw new RTException('cannot send because of transport mRunning = false');
    }
  }
send ( buffer ) { if ( this . mRunning ) { const sendBuff = Buffer . alloc ( RTConst . PROTOCOL_HEADER_LEN + buffer . length ) ; sendBuff . writeUInt32BE ( buffer . length , 0 ) ; sendBuff . fill ( buffer , RTConst . PROTOCOL_HEADER_LEN ) ; this . socket . write ( sendBuff , RTConst . DEFAULT_CHARSET ) ; } else { throw new RTException ( 'cannot send because of transport mRunning = false' ) ; } }
send buffer to dest host
 @param {Buffer} buffer the send buffer
send buffer to dest host @param { Buffer } buffer the send buffer
// write buffer header // copy content buffer // send buffer