## The `Receive' method

Argument: None
Result: Character vector

Valid for: Socket

The `Receive` method is used by client sockets to receive data from the server. It takes no arguments, and returns a character vector, which is the data received (as an untranslated sequence of raw bytes). The APL task will block until the data has been received, or the time specified in the `timeout` property has elapsed.

If you do not want the task to be blocked waiting for data, use the `onReceive` event to ensure that `Receive` is called only when there is data already waiting.

If an error occurs, or the timeout expires, an empty vector will be returned. The `status` property can be used to find out more about the error,

Topic: APLX Help : System Classes : Methods : Receive

[ Previous | Next | Contents | Index ]