TCPSocket.Read Function

Reads the passed number of bytes from the internal receive buffer. If fewer bytes than are requested are available, only the existing bytes are returned.

Syntax
result = TCPSocket.Read( ByteCount, [Encoding] )

Parameters
ByteCount | Integer
Encoding | TextEncoding (Optional)

Return Value
Result | String

# Notes

Returns the data as a String. The optional Encoding parameter enables you to specify the text encoding of the data to be returned. Use the Encodings object to specify a text encoding.