(self, str)
| 4 | |
| 5 | class Protocol(TBinaryProtocol.TBinaryProtocol): |
| 6 | def writeString(self, str): |
| 7 | try: |
| 8 | str = str.encode("utf8", "ignore") |
| 9 | except Exception, e: |
| 10 | pass |
| 11 | |
| 12 | self.writeI32(len(str)) |
| 13 | self.trans.write(str) |
| 14 | |
| 15 | def readString(self): |
| 16 | len = self.readI32() |