RefactoringRope/JsonServer.py

branch
server_client_variant
changeset 210
8b07adc3cb87
parent 209
c1dce8630555
child 245
75a35a927952
--- a/RefactoringRope/JsonServer.py	Thu Oct 05 19:24:14 2017 +0200
+++ b/RefactoringRope/JsonServer.py	Fri Oct 06 18:39:09 2017 +0200
@@ -195,7 +195,9 @@
             connection = self.__connection
         
         if connection is not None:
-            connection.write(cmd.encode('utf8', 'backslashreplace'))
+            data = cmd.encode('utf8', 'backslashreplace')
+            length = "{0:09d}".format(len(data))
+            connection.write(length.encode() + data)
             if flush:
                 connection.flush()
     

eric ide

mercurial