Back to product page

Peek method


Receives incoming text without removing it from the buffer.

Type

String

Syntax

  • C#
  • VB.NET
public String Peek();
The Peek() syntax has these parts:
Return valueNew string with received text.

public Function Peek() As String
The Peek() syntax has these parts:
Return valueNew string with received text.

Remarks

Peek method will return contents of incoming buffer, without removing it from the buffer. It can be used to check if expected data is received so it can be read all at once. In Blocking mode, Peek method will block the executing until it finds some data - just as Receive method would. But, unlike Receive method, Peek will not delete incoming data from wodSSH.

This method will always return string expression - if you prefer to get byte array use PeekData method instead.

Platforms

Windows