See Also

SegmentedStream Class  | SegmentedStream Members  | Overload List

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Language

Visual Basic

C#

C++

C++/CLI

Show All

delimiter
The sequence to find.
maxLength
The maximum length of the string returned.
found
Will be set to true if sequence is found; false otherwise.
See Also Languages PowerTCP SSL Sockets for .NET

Read(String,Int32,Boolean) Method

Dart.PowerTCP.SslSockets Namespace > SegmentedStream Class > Read Method : Read(String,Int32,Boolean) Method

Read data from the stream until a delimiter is reached.

[Visual Basic]
Overloads Public Function Read( _    ByVal delimiter As String, _    ByVal maxLength As Integer, _    ByRef found As Boolean _ ) As String
[C#]
public string Read(    string delimiter,    int maxLength,    ref bool found );
[C++]
public: string* Read(    string* delimiter,    int maxLength,    ref bool found )
[C++/CLI]
public: String^ Read(    String^ delimiter,    int maxLength,    % bool found )

Parameters

delimiter
The sequence to find.
maxLength
The maximum length of the string returned.
found
Will be set to true if sequence is found; false otherwise.

Return Type

A string representation of the bytes read.

Exceptions

ExceptionDescription
IOExceptionThrown when the stream is not Readable.

Remarks

This method reads data from the stream until delimiter is found or the end of the stream is reached.

This method is useful for reading until a sequence of characters is found. A good example of this is receiving an email message when using the POP protocol. When sending a POP mail message, a POP server will delimit the end of the message with <CRLF>.<CRLF>. Using this method you could simply read the data until this sequence is found, at which point the method would return.

If the delimiter is found, found is true, otherwise found is false.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

SegmentedStream Class  | SegmentedStream Members  | Overload List


Send comments on this topic.

Documentation version 1.1.2.0.

© 2008 Dart Communications.  All rights reserved.