Packagecom.electrotank.electroserver4.message.event
Classpublic class ConnectionClosedEvent
InheritanceConnectionClosedEvent Inheritance EventImpl Inheritance MessageImpl

If a text or binary connection to ElectroServer is closed then this event is dispatched.


Example
This shows how to listen for the ConnectionClosedEvent.
    import com.electrotank.electroserver4.ElectroServer;
    import com.electrotank.electroserver4.message.MessageType;
    import com.electrotank.electroserver4.message.event.ConnectionClosedEvent;
    //
    var es:ElectroServer;
    es.addEventListener(MessageType.ConnectionClosedEvent, "onConnectionClosedEvent", this);
    function onConnectionClosedEvent(e:ConnectionClosedEvent):void {
        trace("connection closed");
    }
         



Public Properties
 PropertyDefined by
 Inheritedtarget : Object
MessageImpl
 Inheritedtype : String
MessageImpl
Public Methods
 MethodDefined by
  
Creates a new instance of the ConnectionClosedEvent.
ConnectionClosedEvent
  
Gets the Connection that was closed.
ConnectionClosedEvent
 Inherited
Used internally when one client-request needs to be remapped to a server request.
MessageImpl
 Inherited
getMessageId():Number
The id of the message.
MessageImpl
 Inherited
The type of message being used.
MessageImpl
 Inherited
If this is not a real message, then get it.
MessageImpl
 Inherited
setIsRealServerMessage(isRealServerMessage:Boolean):void
Used internally when one client-request needs to be remapped to a server request.
MessageImpl
 Inherited
setMessageId(id:Number):void
The id of the message.
MessageImpl
 Inherited
This defines the type of message being used, such as LoginRequest or CreateRoomVariableRequest.
MessageImpl
 Inherited
Every messages have varying optional fields.
MessageImpl
Constructor detail
ConnectionClosedEvent()constructor
public function ConnectionClosedEvent()

Creates a new instance of the ConnectionClosedEvent.

Method detail
getConnection()method
public function getConnection():AbstractConnection

Gets the Connection that was closed.

Returns
AbstractConnection — The Connection class instance that was closed.