Back to product page

Receive method


Receives data from server.

Type

Variant

Syntax

  • Basic
object.Receive ([Count], [Type])
The Receive(object,Count,Type) syntax has these parts:
objectAn expression evaluating to an object of type wodTelnetDLX
CountOptional. A Variant value. Total number of bytes you want to receive.
TypeOptional. A Variant value. Determines type of data you want to receive.

Remarks

Receive method is used to get data received from server, and store it to your program. It can be used only after Received event is fired (in blocking mode it can be used at any time). Received event will provide information about total number of bytes received and waiting to be read by your program. You can use that value for Count parameter.

Type parameter should be vbString (8) which means that returned type will be string, or else it should be vbByte (17) or vbArray (8192) which means returned data should be byte array. Depending on your choice, you should store it to appropriate variable.

If no parameters are specified, Receive method will returned everything received from server, as string type data.

In blocking mode, Receive method will block until specified amount of data arrives, or until Timeout expires. If timeout expires, you will get an error, but you will still be able to send new data to the server because connection will not be terminated.

Platforms

Windows