Browse Source

added XMLSocket.

Nicolas Cannasse 19 years ago
parent
commit
0b17e8b279
3 changed files with 15 additions and 0 deletions
  1. 1 0
      std/flash/Boot.hx
  2. 13 0
      std/flash/XMLSocket.hx
  3. 1 0
      std/haxe/ImportAll.hx

+ 1 - 0
std/flash/Boot.hx

@@ -275,6 +275,7 @@ class Boot {
 			flash.TextFormat = _global["TextFormat"];
 			flash.TextSnapshot = _global["TextSnapshot"];
 			flash.Video = _global["Video"];
+			flash.XMLSocket = _global["XMLSocket"];
 
 			Lib._global = _global;
 			Lib._root = _root;

+ 13 - 0
std/flash/XMLSocket.hx

@@ -0,0 +1,13 @@
+package flash;
+
+extern class XMLSocket {
+
+	function new() : Void;
+	function connect( url : String, port : Int ) : Bool;
+	function send( data : Dynamic ) : Bool;
+	function close() : Bool;
+	function onData( src : String ) : Void;
+	function onXML( src : Node ) : Void;
+	function onConnect( success : Bool ) : Void;
+	function onClose() : Void;
+}

+ 1 - 0
std/haxe/ImportAll.hx

@@ -69,6 +69,7 @@ import flash.TextField;
 import flash.TextFormat;
 import flash.TextSnapshot;
 import flash.Video;
+import flash.XMLSocket;
 
 import flash.text.StyleSheet;
 import flash.system.Capabilities;