SSH.Channel.Read - charonn0/RB-libssh2 GitHub Wiki
Function Read(Count As Integer, StreamID As Integer, encoding As TextEncoding = Nil) As String
Private Function Read(Count As Integer, encoding As TextEncoding = Nil) As String Implements Readable.Read| Name | Type | Comment |
|---|---|---|
Count |
Integer | The number of bytes to read. |
StreamID |
Integer | The stream to read from. |
Encoding |
TextEncoding |
Optional. The TextEncoding of the data being read. |
Returns a String containing the data that was read. When called on the Readable (or SSHStream) interface StreamID=0 will be used.
Reads bytes from a stream within the channel if there is data available.
A channel has at least one and possibly several (up to 232) independent streams, identified by their stream ID. For example, if the channel represents the I/O streams of a program executing on the server then stream ID 0 represents StdIn and StdOut, while ID 1 represents StdErr.