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

sendTo

Description

Sends data to a specific destination.


Syntax

socket.sendTo(stream, len, port[, address[, flag]])


Parameters

stream
A StringStream object containing the output data.
len
Specifies the number of bytes to send.
port
Integer. The port of the destination.
address
Optional. String. Specifies the network address of the destination. If this parameter is not specified, the socket sends a broadcast.
flag
Optional. Integer. Specifies the way in which the call is made. It can be a combination of the following data:

Flag Description
0x04 Specifies that the data should not be subject to routing.
0x01 Process out-of-band data


Returns

Integer. The number of bytes sent.




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