blob: 598eeb25a3c6cc12f64e084b67092ae44dd436b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package {
import flash.events.Event;
/**
* This class represents a generic websocket event. It contains the standard "type"
* parameter as well as a "message" parameter.
*/
public class WebSocketEvent extends Event {
public static const OPEN:String = "open";
public static const CLOSE:String = "close";
public static const MESSAGE:String = "message";
public static const ERROR:String = "error";
public var message:String;
public function WebSocketEvent(
type:String, message:String = null, bubbles:Boolean = false, cancelable:Boolean = false) {
super(type, bubbles, cancelable);
this.message = message;
}
public override function clone():Event {
return new WebSocketEvent(this.type, this.message, this.bubbles, this.cancelable);
}
public override function toString():String {
return "WebSocketEvent: " + this.type + ": " + this.message;
}
}
}
|