next up previous contents
Next: receiveFrom Up: Methods Previous: listen   Contents

receive

Description

Receives data from a socket.


Syntax

socket.receive(stream, len[, flag])


Parameters

stream
A StringStream object for the incoming data.
len
Integer. Specifies the number of bytes to retrieve.
flag
Optional. Integer. Specifies the way in which the call is made. It can be a combination of the following data

Flag Description
0x02 Peek at the incoming data. The data is copied into the StringStream but is not removed from the input queue.
0x01 Process out-of-band data


Returns

Integer. The number of bytes received.




Copyright ©2000-2010 Shanghai TopCMM Software Technologies. All Rights Reserved.