import ByteArray from "../utils/ByteArray"; import Event from "./Event"; declare namespace openfl.events { /** * A DatagramSocketDataEvent object is dispatched when Datagram socket has received data. * */ export class DatagramSocketDataEvent extends Event { /** * Creates an Event object that contains information about datagram events. Event objects are passed as parameters * to event listeners. * * @param type The type of the event. Possible values are:DatagramSocketDataEvent.DATA * @param bubbles Determines whether the Event object participates in the bubbling stage of the event flow. * @param cancelable Determines whether the Event object can be canceled. * @param srcAddress The IP address of the machine that sent the packet. * @param srcPort The port on the machine that sent the packet. * @param dstAddress The IP address to which the packet is addressed. * @param dstPort The port to which the packet is addressed. * @param data The datagram packet data. * */ constructor(type: string, bubbles?: boolean, cancelable?: boolean, srcAddress?: string, srcPort?: number, dstAddress?: string, dstPort?: number, data?: ByteArray); /** * Defines the value of the type property of a data event object. * */ static readonly DATA = "data"; /** * The datagram packet data. * */ data: ByteArray; /** * The IP address of the DatagramSocket object that dispatched this event. * * * Note: If the socket is bound to the special address: 0.0.0.0, then this property will return * 0.0.0.0. In order to know the specific IP to which the datagram message is sent, you must bind * the socket to an explicit IP address. * */ dstAddress: string; /** * The port of the DatagramSocket object that dispatched this event. * * */ dstPort: number; /** * The IP address of the machine that sent the packet. * */ srcAddress: string; /** * The port on the machine that sent the packet. * */ srcPort: number; /** * Creates a copy of the DatagramSocketDataEvent object and sets each property's value to match that of the original. * @return A new DatagramSocketDataEvent object with property values that match those of the original. * */ override clone(): Event; /** * Returns a string that contains all the properties of the DatagramSocketDataEvent object. The string is in the following format: * * [DatagramSocketDataEvent type=value bubbles=value cancelable=value srcAddress=value srcPort=value dstAddress=value dstPort=value data=value] * @return A string that contains all the properties of the ProgressEvent object. * */ override toString(): string; } } export default openfl.events.DatagramSocketDataEvent;