PowerTCP SSH and SFTP for .NET
Read(String,Object) Method




A delimiter string to search for. If null, the socket is read until a timeout occurs or the server closes the connection.
Optional parameter useful for passing state information to the Data event in a COM environment.
Receives data until a delimiter is found.
Syntax
'Declaration
 
Public Overloads Function Read( _
   ByVal delimiter As String, _
   ByVal state As Object _
) As Data
'Usage
 
Dim instance As SessionStream
Dim delimiter As String
Dim state As Object
Dim value As Data
 
value = instance.Read(delimiter, state)
public Data Read( 
   string delimiter,
   object state
)
public: Data* Read( 
   string* delimiter,
   Object* state
) 
public:
Data^ Read( 
   String^ delimiter,
   Object^ state
) 

Parameters

delimiter
A delimiter string to search for. If null, the socket is read until a timeout occurs or the server closes the connection.
state
Optional parameter useful for passing state information to the Data event in a COM environment.

Return Value

A Data object encapsulating the received data.
Remarks
This method blocks until the delimiter is found, the timeout period expires, or the server closes the connection. If the method times out, all received data will be returned, and an exception will NOT be thrown. Instead, the returned Data.Delimiter will be null, indicating the delimiter was not found.
See Also

Reference

SessionStream Class
SessionStream Members
Overload List


PowerTCP SSH and SFTP for .NET Documentation Version 7.0
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic