Socket.hx 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package flash.net;
  2. extern class Socket extends flash.events.EventDispatcher, implements flash.utils.IDataOutput, implements flash.utils.IDataInput {
  3. var bytesAvailable(default,null) : UInt;
  4. @:require(flash11) var bytesPending(default,null) : UInt;
  5. var connected(default,null) : Bool;
  6. var endian : flash.utils.Endian;
  7. var objectEncoding : UInt;
  8. @:require(flash10) var timeout : UInt;
  9. function new(?host : String, port : Int = 0) : Void;
  10. function close() : Void;
  11. function connect(host : String, port : Int) : Void;
  12. function flush() : Void;
  13. function readBoolean() : Bool;
  14. function readByte() : Int;
  15. function readBytes(bytes : flash.utils.ByteArray, offset : UInt = 0, length : UInt = 0) : Void;
  16. function readDouble() : Float;
  17. function readFloat() : Float;
  18. function readInt() : Int;
  19. function readMultiByte(length : UInt, charSet : String) : String;
  20. function readObject() : Dynamic;
  21. function readShort() : Int;
  22. function readUTF() : String;
  23. function readUTFBytes(length : UInt) : String;
  24. function readUnsignedByte() : UInt;
  25. function readUnsignedInt() : UInt;
  26. function readUnsignedShort() : UInt;
  27. function writeBoolean(value : Bool) : Void;
  28. function writeByte(value : Int) : Void;
  29. function writeBytes(bytes : flash.utils.ByteArray, offset : UInt = 0, length : UInt = 0) : Void;
  30. function writeDouble(value : Float) : Void;
  31. function writeFloat(value : Float) : Void;
  32. function writeInt(value : Int) : Void;
  33. function writeMultiByte(value : String, charSet : String) : Void;
  34. function writeObject(object : Dynamic) : Void;
  35. function writeShort(value : Int) : Void;
  36. function writeUTF(value : String) : Void;
  37. function writeUTFBytes(value : String) : Void;
  38. function writeUnsignedInt(value : UInt) : Void;
  39. }