소스 검색

[python] add Socket.read and Socket.write (closes #3325)

Dan Korostelev 11 년 전
부모
커밋
c2c5e1fd9d
1개의 변경된 파일2개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 5
      std/python/_std/sys/net/Socket.hx

+ 2 - 5
std/python/_std/sys/net/Socket.hx

@@ -133,9 +133,6 @@ private class SocketOutput extends haxe.io.Output {
         Creates a new unconnected socket.
         Creates a new unconnected socket.
     **/
     **/
     public function new() : Void {
     public function new() : Void {
-        //var __s = new PSocket();
-        //input = new SocketInput(__s);
-        //output = new SocketOutput(__s);
     }
     }
 
 
     function __init() : Void  {
     function __init() : Void  {
@@ -155,14 +152,14 @@ private class SocketOutput extends haxe.io.Output {
         Read the whole data available on the socket.
         Read the whole data available on the socket.
     **/
     **/
     public function read() : String {
     public function read() : String {
-        return "";
+        return input.readAll().toString();
     }
     }
 
 
     /**
     /**
         Write the whole data to the socket output.
         Write the whole data to the socket output.
     **/
     **/
     public function write( content : String ) : Void {
     public function write( content : String ) : Void {
-
+        output.writeString(content);
     }
     }
 
 
     /**
     /**