ssh2
ssh2 copied to clipboard
By default stream is outputting `string` is there a way to get a `Buffer`?
I am implementing a server, and logging data arriving from a stream after a call to
// Create a stream for Git Smart Protocol communication
const stream: ssh2.ServerChannel = acceptExec()
By that I mean performing a typeof on the object from stream.on('data', data => {console.log(typeof data)}) returns string
Am I doing something wrong?
Are you using ssh2 directly? If so, can you show a complete minimal example in JS that reproduces the problem? Streams should always emit Buffers unless you call something like stream.setEncoding().