method
udp.SocketHandler.data
Referenced types
interface Socket<DataBinaryType extends BinaryType>
- @param multicastAddress
The multicast group address
@param interfaceAddressOptional interface address to use
@returnstrue on success
- sourceAddress: string,groupAddress: string,interfaceAddress?: string): boolean;
Join a source-specific multicast group.
@param sourceAddressThe source address
@param groupAddressThe multicast group address
@param interfaceAddressOptional interface address to use
@returnstrue on success
- multicastAddress: string,interfaceAddress?: string): boolean;
Leave a multicast group.
@param multicastAddressThe multicast group address
@param interfaceAddressOptional interface address to use
@returnstrue on success
- sourceAddress: string,groupAddress: string,interfaceAddress?: string): boolean;
Leave a source-specific multicast group.
@param sourceAddressThe source address
@param groupAddressThe multicast group address
@param interfaceAddressOptional interface address to use
@returnstrue on success
- @param enabled
Whether to enable broadcast
@returnsThe enabled value
- interfaceAddress: string): boolean;
Set the IP_MULTICAST_IF socket option to specify the outgoing interface for multicast packets.
@param interfaceAddressThe address of the interface to use
@returnstrue on success
- enabled: boolean): boolean;
Enable or disable the IP_MULTICAST_LOOP socket option.
@param enabledWhether to enable multicast loopback
@returnsThe enabled value
- @param ttl
Time to live value for multicast packets
@returnsThe TTL value
- @param ttl
Time to live value
@returnsThe TTL value
interface ReceiveFlags
Extra metadata passed to the data callback for each received datagram.
- ipv6: boolean
trueif the datagram's source address was IPv6,falsefor IPv4. Reflects the packet's ownsockaddr— a socket adopting an existing fd may receive packets of the other family than it was created with. - truncated: boolean
trueif the datagram was larger than the receive buffer and was truncated by the kernel (MSG_TRUNC). Thedatapassed to the callback contains only the portion that fit in the buffer.