next up previous contents
Next: send Up: Methods Previous: receive   Contents

receiveFrom

Description

Receives a datagram and stores the source address


Syntax

socket.receiveFrom(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

An object contains following properties:
address
String. A dotted number IP address of the source
port
Integer. The port of the source
length
Integer. The number of bytes received.




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