Commits

Florian Schlachter  committed 01c39c5

Removed some unnecessary code. Added readme notice.

  • Participants
  • Parent commits b133b6c

Comments (0)

Files changed (3)

 in a secure and restricted environment (a public server is therefore absolutely
 **not** recommended).
 
+Transmission is compressed using zlib.
+
 ## Usage
 
 Using PyRPC is pretty simple. See `client_example.py` for client-usage. The server

File pyrpc/message.py

 import zlib
 import struct
 import cPickle
-import time
-import random
-
-random.seed(time.time())
 
 class MessageException(Exception): pass
 class MessageIncomplete(MessageException): pass

File pyrpc/server.py

             self.socket.close()
             self.socket = None
 
-    def _check_healthy(self):
-        if not self.socket:
-            return False
-        return True
-
     def handle_read(self):
-        if not self._check_healthy():
+        if not self.socket:
             # Connection not healthy, return!
             return False
 
         return True
     
     def handle_write(self):
-        if not self._check_healthy():
+        if not self.socket:
             # Connection not healthy, return!
             return False