Dart Tcp, Daemon, Udp Controls
ReadString Method
Specifies how much data is to be read.
Description
Return data from the current position as a String. Reading starts at the Position property. Set Position to change the position.
Syntax
Visual Basic
Public Function ReadString( _
   Optional ByVal Count As Long = 0 _
) As String
Parameters
Count
Specifies how much data is to be read.
Remarks

Some environments, such as JavaScript, do not support the passing of parameters by reference. Consequently, such methods as Receive cannot be used by passing in a String. You can use the DartStream Object to circumvent this limitation, as shown in the following Java sample:

<% @LANGUAGE="JScript"%>
<%
 var Tcp = Server.CreateObject("Dart.Tcp.1");
 Tcp.TimeOut = 30000;
 Tcp.Connect("www.microsoft.com", 80);
 Tcp.Send("GET / HTTP/1.0\r\n\r\n");
 var Stream = Server.CreateObject("Dart.DartStream");
 while(Tcp.State != 0)
 Tcp.Receive(Stream);
 Stream.Position = 0;
 Response.Write(Stream.ReadString());
%>

Error Codes

This method may generate the following error code (refer to ErrorConstants for a complete list of error codes):

See Also

DartStream Object  | DartStream Members


PowerTCP SSL for ActiveX Documentation Version 2.2.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic