Variables
read onlyremoteAddress:Null<SocketAddress>
Remote address and port that this socket is connected to. See connect.
Methods
addMembership (multicastAddress:String, ?multicastInterface:String):Void
Joins the given multicast group.
bind (?address:Address, ?port:Int):Void
Binds this socket to a local address and port. Packets sent to the bound
address will arrive via messageSignal. Outgoing packets will be sent from
the given address and port. If any packet is sent without calling bind
first, an address and port is chosen automatically by the system - it can
be obtained with localAddress.
connect (?address:Address, port:Int):Void
Connects this socket to a remote address and port. Any send calls after
connect is called must not specify address nor port, they will
automatically use the ones specified in the connect call.
dropMembership (multicastAddress:String, ?multicastInterface:String):Void
Leaves the given multicast group.
send (msg:Bytes, offset:Int, length:Int, ?address:Address, ?port:Int, ?callback:Callback<NoData>):Void
Sends a message.
Parameters:
msg | Buffer from which to read the message data. |
|---|---|
offset | Position in |
length | Length of message in bytes. |
address | Address to send the message to. Must be |
port | Port to send the message to. Must be |
setMulticastInterface (multicastInterface:String):Void
Sets the multicast interface on which to send and receive data.
setMulticastLoopback (flag:Bool):Void
Set IP multicast loopback on or off. Makes multicast packets loop back to local sockets.