Constructor
new WriteTransform()
- Source:
Example
const { ReadTransform } = require('qtdatastream').transform;
const writer = new WriteTransform();
writer.on('data', (data) => {
// data === Buffer <00 00 00 09 00 00 00 03 00 00 00 00 01>
});
// Write an int
writer.write(1);
Fires:
Extends
- stream.Transform
Methods
(static) getBuffer() → {Buffer}
- Source:
Get the buffer representation of the object. It is prefixed by the packet size as defined in Qt framework.
Returns:
A Qt styled buffer ready to be sent through a socket
- Type
- Buffer