Lines Matching refs:protocol

21 from thrift.protocol import TCompactProtocol
39 protocol = TCompactProtocol.TCompactProtocol(transport)
42 protocol.state = VALUE_WRITE
43 protocol.writeByte(data)
46 protocol.state = CONTAINER_WRITE
47 protocol.writeI16(data)
50 protocol.state = CONTAINER_WRITE
51 protocol.writeI32(data)
54 protocol.state = CONTAINER_WRITE
55 protocol.writeI64(data)
58 protocol.state = CONTAINER_WRITE
59 protocol.writeString(data)
62 protocol.state = VALUE_WRITE
63 protocol.writeDouble(data)
66 protocol.state = FIELD_WRITE
67 protocol.writeBinary(data)
70 protocol.state = CONTAINER_WRITE
71 protocol.writeBool(True)
77 protocol = TCompactProtocol.TCompactProtocol(transport)
79 protocol.state = VALUE_READ
80 return protocol.readByte()
83 protocol.state = CONTAINER_READ
84 return protocol.readI16()
87 protocol.state = CONTAINER_READ
88 return protocol.readI32()
91 protocol.state = CONTAINER_READ
92 return protocol.readI64()
95 protocol.state = VALUE_READ
96 return protocol.readString()
99 protocol.state = VALUE_READ
100 return protocol.readDouble()
103 protocol.state = FIELD_READ
104 return protocol.readBinary()
107 protocol.state = CONTAINER_READ
108 return protocol.readBool()
115 protocol = TCompactProtocol.TCompactProtocol(transport)
116 protocol.writeStructBegin('struct')
117 protocol.writeFieldBegin("field", TType[type.capitalize()], 10)
119 protocol.writeByte(data)
122 protocol.writeI16(data)
125 protocol.writeI32(data)
128 protocol.writeI64(data)
131 protocol.writeString(data)
134 protocol.writeDouble(data)
137 protocol.writeBinary(data)
140 protocol.writeBool(data)
142 protocol.writeFieldEnd()
143 protocol.writeStructEnd()
150 protocol = TCompactProtocol.TCompactProtocol(transport)
151 protocol.readStructBegin()
152 protocol.readFieldBegin()
154 return protocol.readByte()
157 return protocol.readI16()
160 return protocol.readI32()
163 return protocol.readI32()
166 return protocol.readString()
169 return protocol.readDouble()
172 return protocol.readBinary()
175 return protocol.readBool()
177 protocol.readFieldEnd()
178 protocol.readStructEnd()
189 protocol = TCompactProtocol.TCompactProtocol(transport)
190 protocol.writeMessageBegin(message['name'], message['type'], message['seqid'])
191 protocol.writeMessageEnd()
198 protocol = TCompactProtocol.TCompactProtocol(transport)
199 result = protocol.readMessageBegin()
200 protocol.readMessageEnd()