Simon Krajewski 11 роки тому
батько
коміт
e4b1026646
3 змінених файлів з 27 додано та 27 видалено
  1. 10 10
      std/python/_std/sys/net/Socket.hx
  2. 3 3
      std/python/lib/Types.hx
  3. 14 14
      std/python/lib/net/Socket.hx

+ 10 - 10
std/python/_std/sys/net/Socket.hx

@@ -30,13 +30,13 @@ import python.lib.net.Socket.Select in Select;
 import python.lib.net.Address in PAddress;
 
 private class SocketInput extends haxe.io.Input {
-    
+
     var __s : PSocket;
 
     public function new(s) {
         __s = s;
     }
-    
+
     public override function readByte() : Int {
         var r:BytesData;
         try {
@@ -69,11 +69,11 @@ private class SocketInput extends haxe.io.Input {
         super.close();
         if( __s != null ) __s.close();
     }
-    
+
 }
 
 private class SocketOutput extends haxe.io.Output {
-    
+
     var __s : PSocket;
 
     public function new(s) {
@@ -110,7 +110,7 @@ private class SocketOutput extends haxe.io.Output {
 **/
 @:coreApi class Socket {
 
-    
+
     var __s:PSocket;
     /**
         The stream on which you can read available data. By default the stream is blocking until the requested data is available,
@@ -136,7 +136,7 @@ private class SocketOutput extends haxe.io.Output {
         //input = new SocketInput(__s);
         //output = new SocketOutput(__s);
     }
-    
+
     function __init() : Void  {
         __s = new PSocket();
         input = new SocketInput(__s);
@@ -161,7 +161,7 @@ private class SocketOutput extends haxe.io.Output {
         Write the whole data to the socket output.
     **/
     public function write( content : String ) : Void {
-        
+
     }
 
     /**
@@ -183,7 +183,7 @@ private class SocketOutput extends haxe.io.Output {
     /**
         Shutdown the socket, either for reading or writing.
     **/
-    public function shutdown( read : Bool, write : Bool ) : Void 
+    public function shutdown( read : Bool, write : Bool ) : Void
         __s.shutdown( (read && write) ? PSocket.SHUT_RDWR : read ?  PSocket.SHUT_RD : PSocket.SHUT_WR  );
 
     /**
@@ -234,7 +234,7 @@ private class SocketOutput extends haxe.io.Output {
         Block until some data is available for read on the socket.
     **/
     public function waitForRead() : Void {
-        
+
     }
 
     /**
@@ -250,7 +250,7 @@ private class SocketOutput extends haxe.io.Output {
     public function setFastSend( b : Bool ) : Void {}
 
     @:keep function fileno():Int return __s.fileno();
-    
+
     /**
         Wait until one of the sockets groups is ready for the given operation :
         [read] contains sockets on which we want to wait for available data to be read,

+ 3 - 3
std/python/lib/Types.hx

@@ -34,13 +34,13 @@ extern class ByteArray implements ArrayAccess<Int> {
 	public inline function get(i:Int):Int {
 		return python.Syntax.arrayAccess(this, i);
 	}
-	
+
 	public inline function set(i:Int,v:Int):Void {
         this.__setitem__(i,v);
     }
-    
+
     public function __setitem__(i:Int,v:Int):Void;
-    
+
 	public function decode(encoding:String="utf-8", errors:String="strict"):String;
 }
 

+ 14 - 14
std/python/lib/net/Socket.hx

@@ -34,23 +34,23 @@ typedef Selectable = {
 
 @:native("select")
 extern class Select {
-    
+
     static function __init__ ():Void
     {
         Syntax.importModule("select");
     }
-    
+
     static function select<T>(reads:Array<T>,writes:Array<T>,xs:Array<T>,timeout:Float):Tup3<Array<T>,Array<T>,Array<T>>;
-    
+
 }
 
 extern class Socket {
-    
+
     static function __init__ ():Void
     {
         Syntax.importFromAs("socket", "socket", "python.lib.net.Socket");
     }
-    
+
     static var AF_APPLETALK:Int;
     static var AF_ASH:Int;
     static var AF_ATMPVC:Int;
@@ -312,12 +312,12 @@ extern class Socket {
     static var TIPC_WITHDRAWN:Int;
     static var TIPC_ZONE_SCOPE:Int;
     static var _GLOBAL_DEFAULT_TIMEOUT:Int;
-    
+
     function send(d:BytesData,flags:Int):Int;
     function recv(n:Int,flags:Int):BytesData;
-    
-    
-    
+
+
+
     /**
         Creates a new unconnected socket.
     **/
@@ -333,8 +333,8 @@ extern class Socket {
     **/
     function connect( addr : python.lib.net.Address ) : Void;
 
-    //function create_connection() : 
-    
+    //function create_connection() :
+
     /**
         Allow the socket to listen for incoming questions. The parameter tells how many pending connections we can have until they get refused. Use [accept()] to accept incoming connections.
     **/
@@ -381,13 +381,13 @@ extern class Socket {
     function setblocking( b : Bool ) : Void;
 
     /**
-        
+
     **/
     function setsockopt( family:Int, option:Int, value : Bool ) : Void;
 
-    
+
     function fileno():Int;
-    
+
     /**
         Wait until one of the sockets groups is ready for the given operation :
         [read] contains sockets on which we want to wait for available data to be read,