Socket.hx 1.6 KB

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