Method _Stdio.UDP()->send()
- Method
send
 intsend(stringto,int|stringport,stringmessage)
intsend(stringto,int|stringport,stringmessage,intflags)- Description
 Send data to a UDP socket.
- Parameter 
to The recipient address. For connect()ed objects specifying a recipient of either UNDEFINED or
""causes the default recipient to be used.- Parameter 
port The recipient port number. For connect()ed objects specifying port number
0casues the default recipient port to be used.- Parameter 
flag A flag bitfield with
1for out of band data and2for don't route flag.- Returns
 (0..)The number of bytes that were actually written.
(..-1)Failed to send the
message. Check errno() for the cause. Common causes are:System.EMSGSIZEThe
messageis too large to send unfragmented.System.EWOULDBLOCKThe send buffers are full.
- Throws
 Throws errors on invalid arguments and uninitialized object.
- Note
 Versions of Pike prior to 8.1.5 threw errors also on EMSGSIZE (
"Too big message") and EWOULDBLOCK ("Message would block."). These versions of Pike also did not update the object errno on this function failing.- Note
 Versions of Pike prior to 8.1.13 did not support the default recipient for connect()ed objects.
- See also