Back to product page

ReceiveLine method


Receives line of text, if available.

Type

String

Syntax

  • C#
  • VB.NET
public String ReceiveLine();
The ReceiveLine() syntax has these parts:
Return valueNew string with received line of text, or Null.

public Function ReceiveLine() As String
The ReceiveLine() syntax has these parts:
Return valueNew string with received line of text, or Null.

Remarks

ReceiveLine method will return full line from the buffer, if one exists. wodSSH.NET will remove end-of-line markers (CRLF) so you get line of text you don't need to trim or remove such special codes.

If no line can be found in the buffer (but still, data may exist, just not terminated with CR/LF bytes), component will wait for it (if Blocking = True), or will throw "None found" exception. If component returns empty string - it means empty string (terminated with CR/LF bytes) was found and there may be more lines to read.

This method only returns string expression, it cannot return byte array. In Blocking mode, component will wait until Timeout expires to receive full line, if it is not already found in the buffer.

Platforms

Windows