class ServerSocketConnectEvent
package openfl.events
extends Event
Available on all platforms
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.
Static variables
Constructor
new(type:String, bubbles:Bool = false, cancelable:Bool = false, ?socket:Socket)
Creates a ServerSocketConnectEvent object that contains information about a client connection.
Parameters:
type | The type of the event. Must be: ServerSocketConnectEvent.CONNECT. |
---|---|
bubbles | (default = false) Determines whether the Event object participates in the bubbling stage of the event flow. Always false |
cancelable | (default = false) Determines whether the Event object can be canceled. Always false. |
socket | (default = null) The socket for the new connection. |
Variables
Methods
clone():Event
Creates a copy of the ServerSocketConnectEvent object and sets each property's value to match that of the original.
Returns:
Event A new ServerSocketConnectEvent object with property values that match those of the original.
toString():String
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]
Returns:
A string that contains all the properties of the ProgressEvent object.