code: def send(self, obj):
          
          assert isinstance(obj, ProtocolBase)
          string = pickle.dumps(obj)
          length = len(string)
          self.sock.sendall(struct.pack("<I", length) + string)
docs: Prepend a 4-byte length to the string