import Socket from "../net/Socket"; import Event from "./Event"; declare namespace openfl.events { /** * A ServerSocket object dispatches a ServerSocketConnectEvent object when a client attempts to * connect to the server socket. * * The socket property of the ServerSocketConnectEvent object provides the Socket object to use * for subsequent communication between the server and the client. To deny the connection, call * the Socket close() method. * */ export class ServerSocketConnectEvent extends Event { /** * Creates a ServerSocketConnectEvent object that contains information about a client connection. * * @param type The type of the event. Must be: ServerSocketConnectEvent.CONNECT. * @param bubbles (default = false) Determines whether the Event object participates in the * bubbling stage of the event flow. Always false * @param cancelable (default = false) Determines whether the Event object can be canceled. Always * false. * @param socket (default = null) The socket for the new connection. * */ constructor(type: string, bubbles?: boolean, cancelable?: boolean, socket?: Socket); socket: Socket; /** * Creates a copy of the ServerSocketConnectEvent object and sets each property's value to match that * of the original. * @return Event A new ServerSocketConnectEvent object with property values that match those of the original. * */ override clone(): Event; /** * Returns a string that contains all the properties of the ServerSocketConnectEvent object. The string is * in the following format: * [ServerSocketConnectEvent type=value bubbles=value cancelable=value socket=value] * @return A string that contains all the properties of the ProgressEvent object. * */ override toString(): string; } } export default openfl.events.ServerSocketConnectEvent;