readUntil

readUntil(delimiter: Binary;
          maxLength: Integer): Binary;

The readUntil method of the TcpIpConnection class reads binary data from the connection and returns when the delimiter specified in the delimiter parameter is found in the data stream. Use this method if you use delimiters as an end-of-message mechanism as part of your communications protocol so that you do not have to read a character at a time and scan or handle your own data buffering.

You can use the maxLength parameter to specify a maximum read size if the specified delimiter cannot be found. (A value of zero (0) indicates that there is no maximum read size.)

This method can be called only when the value of the Connection class state property is Connected (2). See also the Connection class timeout property.

Only one synchronous or asynchronous read operation can be performed at one time on a connection.

The delimiter is not included in the returned data.

A String value typecast to a Binary value and specified as a delimiter in a Unicode JADE system contains Unicode characters in the Binary value.