Home
last modified time | relevance | path

Searched refs:protocol (Results 1 – 25 of 545) sorted by relevance

12345678910>>...22

/thrift-3.4.0/lib/c_glib/src/thrift/c_glib/protocol/
Dthrift_protocol.c40 ThriftProtocol *protocol = THRIFT_PROTOCOL (object); in G_DEFINE_ABSTRACT_TYPE() local
47 g_value_set_object (value, protocol->transport); in G_DEFINE_ABSTRACT_TYPE()
57 ThriftProtocol *protocol = THRIFT_PROTOCOL (object); in thrift_protocol_set_property() local
64 protocol->transport = g_value_dup_object (value); in thrift_protocol_set_property()
71 thrift_protocol_write_message_begin (ThriftProtocol *protocol, in thrift_protocol_write_message_begin() argument
76 return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_message_begin in thrift_protocol_write_message_begin()
77 (protocol, name, in thrift_protocol_write_message_begin()
83 thrift_protocol_write_message_end (ThriftProtocol *protocol, GError **error) in thrift_protocol_write_message_end() argument
85 return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_message_end (protocol, in thrift_protocol_write_message_end()
90 thrift_protocol_write_struct_begin (ThriftProtocol *protocol, const gchar *name, in thrift_protocol_write_struct_begin() argument
[all …]
Dthrift_binary_protocol.c53 thrift_binary_protocol_write_message_begin (ThriftProtocol *protocol, in thrift_binary_protocol_write_message_begin() argument
62 g_return_val_if_fail (THRIFT_IS_BINARY_PROTOCOL (protocol), -1); in thrift_binary_protocol_write_message_begin()
64 if ((ret = thrift_protocol_write_i32 (protocol, version, error)) < 0) in thrift_binary_protocol_write_message_begin()
69 if ((ret = thrift_protocol_write_string (protocol, name, error)) < 0) in thrift_binary_protocol_write_message_begin()
74 if ((ret = thrift_protocol_write_i32 (protocol, seqid, error)) < 0) in thrift_binary_protocol_write_message_begin()
83 thrift_binary_protocol_write_message_end (ThriftProtocol *protocol, in thrift_binary_protocol_write_message_end() argument
87 THRIFT_UNUSED_VAR (protocol); in thrift_binary_protocol_write_message_end()
93 thrift_binary_protocol_write_struct_begin (ThriftProtocol *protocol, in thrift_binary_protocol_write_struct_begin() argument
98 THRIFT_UNUSED_VAR (protocol); in thrift_binary_protocol_write_struct_begin()
105 thrift_binary_protocol_write_struct_end (ThriftProtocol *protocol, in thrift_binary_protocol_write_struct_end() argument
[all …]
Dthrift_protocol.h101 gint32 (*write_message_begin) (ThriftProtocol *protocol, const gchar *name,
104 gint32 (*write_message_end) (ThriftProtocol *protocol, GError **error);
105 gint32 (*write_struct_begin) (ThriftProtocol *protocol, const gchar *name,
107 gint32 (*write_struct_end) (ThriftProtocol *protocol, GError **error);
108 gint32 (*write_field_begin) (ThriftProtocol *protocol, const gchar *name,
111 gint32 (*write_field_end) (ThriftProtocol *protocol, GError **error);
112 gint32 (*write_field_stop) (ThriftProtocol *protocol, GError **error);
113 gint32 (*write_map_begin) (ThriftProtocol *protocol,
117 gint32 (*write_map_end) (ThriftProtocol *protocol, GError **error);
118 gint32 (*write_list_begin) (ThriftProtocol *protocol,
[all …]
Dthrift_protocol_decorator.c46 thrift_protocol_decorator_write_message_begin (ThriftProtocol *protocol, in thrift_protocol_decorator_write_message_begin() argument
52 ThriftProtocolDecorator *self = THRIFT_PROTOCOL_DECORATOR (protocol); in thrift_protocol_decorator_write_message_begin()
63 thrift_protocol_decorator_write_message_end (ThriftProtocol *protocol, GError **error) in thrift_protocol_decorator_write_message_end() argument
65 ThriftProtocolDecorator *self = THRIFT_PROTOCOL_DECORATOR (protocol); in thrift_protocol_decorator_write_message_end()
72 thrift_protocol_decorator_write_struct_begin (ThriftProtocol *protocol, const gchar *name, in thrift_protocol_decorator_write_struct_begin() argument
75 ThriftProtocolDecorator *self = THRIFT_PROTOCOL_DECORATOR (protocol); in thrift_protocol_decorator_write_struct_begin()
82 thrift_protocol_decorator_write_struct_end (ThriftProtocol *protocol, GError **error) in thrift_protocol_decorator_write_struct_end() argument
84 ThriftProtocolDecorator *self = THRIFT_PROTOCOL_DECORATOR (protocol); in thrift_protocol_decorator_write_struct_end()
91 thrift_protocol_decorator_write_field_begin (ThriftProtocol *protocol, in thrift_protocol_decorator_write_field_begin() argument
97 ThriftProtocolDecorator *self = THRIFT_PROTOCOL_DECORATOR (protocol); in thrift_protocol_decorator_write_field_begin()
[all …]
Dthrift_compact_protocol.c154 ThriftType thrift_compact_protocol_get_ttype (ThriftCompactProtocol *protocol, in thrift_compact_protocol_get_ttype() argument
157 THRIFT_UNUSED_VAR (protocol); in thrift_compact_protocol_get_ttype()
197 thrift_compact_protocol_write_varint32 (ThriftCompactProtocol *protocol, in thrift_compact_protocol_write_varint32() argument
220 if (thrift_transport_write (THRIFT_PROTOCOL (protocol)->transport, in thrift_compact_protocol_write_varint32()
232 thrift_compact_protocol_write_varint64 (ThriftCompactProtocol *protocol, in thrift_compact_protocol_write_varint64() argument
255 if (thrift_transport_write (THRIFT_PROTOCOL (protocol)->transport, in thrift_compact_protocol_write_varint64()
268 thrift_compact_protocol_read_varint64 (ThriftCompactProtocol *protocol, in thrift_compact_protocol_read_varint64() argument
279 tp = THRIFT_PROTOCOL (protocol); in thrift_compact_protocol_read_varint64()
311 thrift_compact_protocol_read_varint32 (ThriftCompactProtocol *protocol, in thrift_compact_protocol_read_varint32() argument
321 if ((ret = thrift_compact_protocol_read_varint64 (protocol, &val, in thrift_compact_protocol_read_varint32()
[all …]
/thrift-3.4.0/lib/c_glib/test/
Dtestcompactprotocol.c113 ThriftCompactProtocol *protocol = NULL; in test_initialize() local
121 protocol = g_object_new (THRIFT_TYPE_COMPACT_PROTOCOL, "transport", in test_initialize()
123 g_assert (protocol != NULL); in test_initialize()
125 g_object_get (G_OBJECT (protocol), "transport", &temp, NULL); in test_initialize()
129 g_object_unref (protocol); in test_initialize()
141 ThriftProtocol *protocol = NULL; in test_read_and_write_primitives() local
169 protocol = THRIFT_PROTOCOL (tc); in test_read_and_write_primitives()
170 g_assert (protocol != NULL); in test_read_and_write_primitives()
173 g_assert (thrift_compact_protocol_write_bool (protocol, TEST_BOOL, NULL) > 0); in test_read_and_write_primitives()
174 g_assert (thrift_compact_protocol_write_byte (protocol, TEST_BYTE, NULL) > 0); in test_read_and_write_primitives()
[all …]
Dtestbinaryprotocol.c106 ThriftBinaryProtocol *protocol = NULL; in test_initialize() local
114 protocol = g_object_new (THRIFT_TYPE_BINARY_PROTOCOL, "transport", in test_initialize()
116 g_assert (protocol != NULL); in test_initialize()
118 g_object_get (G_OBJECT(protocol), "transport", &temp, NULL); in test_initialize()
122 g_object_unref (protocol); in test_initialize()
134 ThriftProtocol *protocol = NULL; in test_read_and_write_primitives() local
162 protocol = THRIFT_PROTOCOL (tb); in test_read_and_write_primitives()
163 g_assert (protocol != NULL); in test_read_and_write_primitives()
166 g_assert (thrift_binary_protocol_write_bool (protocol, TEST_BOOL, NULL) > 0); in test_read_and_write_primitives()
167 g_assert (thrift_binary_protocol_write_byte (protocol, TEST_BYTE, NULL) > 0); in test_read_and_write_primitives()
[all …]
/thrift-3.4.0/lib/dart/test/protocol/
Dt_protocol_test.dart30 TProtocol protocol;
35 return Primitive(protocol.readBool, protocol.writeBool, false);
38 return Primitive(protocol.readByte, protocol.writeByte, 0);
41 return Primitive(protocol.readI16, protocol.writeI16, 0);
44 return Primitive(protocol.readI32, protocol.writeI32, 0);
47 return Primitive(protocol.readI64, protocol.writeI64, 0);
50 return Primitive(protocol.readDouble, protocol.writeDouble, 0);
53 return Primitive(protocol.readString, protocol.writeString, '');
62 protocol.writeMessageEnd();
64 await protocol.transport.flush();
[all …]
/thrift-3.4.0/lib/rb/ext/
Dstruct.c43 VALUE default_write_bool(VALUE protocol, VALUE value) { in default_write_bool() argument
44 rb_funcall(protocol, write_boolean_method_id, 1, value); in default_write_bool()
48 VALUE default_write_byte(VALUE protocol, VALUE value) { in default_write_byte() argument
49 rb_funcall(protocol, write_byte_method_id, 1, value); in default_write_byte()
53 VALUE default_write_i16(VALUE protocol, VALUE value) { in default_write_i16() argument
54 rb_funcall(protocol, write_i16_method_id, 1, value); in default_write_i16()
58 VALUE default_write_i32(VALUE protocol, VALUE value) { in default_write_i32() argument
59 rb_funcall(protocol, write_i32_method_id, 1, value); in default_write_i32()
63 VALUE default_write_i64(VALUE protocol, VALUE value) { in default_write_i64() argument
64 rb_funcall(protocol, write_i64_method_id, 1, value); in default_write_i64()
[all …]
/thrift-3.4.0/lib/py/test/
Dthrift_json.py24 from thrift.protocol.TJSONProtocol import TJSONProtocol
43 protocol = TJSONProtocol(transport)
47 self.assertEqual(protocol.readString(), unicode_text)
54 protocol = TJSONProtocol(transport)
55 protocol.writeJSONObjectStart()
56 protocol.writeJSONString("software")
57 protocol.writeJSONString("thrift")
58 protocol.writeJSONString("1")
59 protocol.writeJSONArrayStart()
60 protocol.writeJSONNumber(23)
[all …]
Dthrift_TCompactProtocol.py21 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)
[all …]
Dthrift_TBinaryProtocol.py23 from thrift.protocol.TBinaryProtocol import TBinaryProtocol
30 protocol = TBinaryProtocol(transport)
32 protocol.writeByte(data)
35 protocol.writeI16(data)
38 protocol.writeI32(data)
41 protocol.writeI64(data)
44 protocol.writeString(data)
47 protocol.writeDouble(data)
50 protocol.writeBinary(data)
53 protocol.writeBool(data)
[all …]
/thrift-3.4.0/lib/nodejs/lib/thrift/
Dheader_protocol.js74 return this.protocol.writeMessageBegin(name, type, seqid);
78 return this.protocol.writeMessageEnd();
82 return this.protocol.writeStructBegin(name);
86 return this.protocol.writeStructEnd();
90 return this.protocol.writeFieldBegin(name, type, id);
94 return this.protocol.writeFieldEnd();
98 return this.protocol.writeFieldStop();
102 return this.protocol.writeMapBegin(ktype, vtype, size);
106 return this.protocol.writeMapEnd();
110 return this.protocol.writeListBegin(etype, size);
[all …]
/thrift-3.4.0/lib/cpp/src/thrift/protocol/
DTProtocolDecorator.h28 namespace protocol {
46 : TProtocol(proto->getTransport()), protocol(proto) {} in TProtocolDecorator()
51 return protocol->writeMessageBegin(name, messageType, seqid); in writeMessageBegin_virt()
53 uint32_t writeMessageEnd_virt() override { return protocol->writeMessageEnd(); } in writeMessageEnd_virt()
55 return protocol->writeStructBegin(name); in writeStructBegin_virt()
57 uint32_t writeStructEnd_virt() override { return protocol->writeStructEnd(); } in writeStructEnd_virt()
62 return protocol->writeFieldBegin(name, fieldType, fieldId); in writeFieldBegin_virt()
65 uint32_t writeFieldEnd_virt() override { return protocol->writeFieldEnd(); } in writeFieldEnd_virt()
66 uint32_t writeFieldStop_virt() override { return protocol->writeFieldStop(); } in writeFieldStop_virt()
71 return protocol->writeMapBegin(keyType, valType, size); in writeMapBegin_virt()
[all …]
/thrift-3.4.0/lib/netstd/Thrift/Protocol/Utilities/
DTProtocolUtil.cs27 …public static async Task SkipAsync(TProtocol protocol, TType type, CancellationToken cancellationT… in SkipAsync() argument
31 protocol.IncrementRecursionDepth(); in SkipAsync()
37 await protocol.ReadBoolAsync(cancellationToken); in SkipAsync()
40 await protocol.ReadByteAsync(cancellationToken); in SkipAsync()
43 await protocol.ReadI16Async(cancellationToken); in SkipAsync()
46 await protocol.ReadI32Async(cancellationToken); in SkipAsync()
49 await protocol.ReadI64Async(cancellationToken); in SkipAsync()
52 await protocol.ReadDoubleAsync(cancellationToken); in SkipAsync()
56 await protocol.ReadBinaryAsync(cancellationToken); in SkipAsync()
59 await protocol.ReadUuidAsync(cancellationToken); in SkipAsync()
[all …]
/thrift-3.4.0/lib/go/test/tests/
Dclient_error_test.go35 func prepareClientCallReply(protocol *MockTProtocol, failAt int, failWith error) bool {
58 …last := protocol.EXPECT().WriteMessageBegin(context.Background(), "testStruct", thrift.CALL, int32…
65 …last = protocol.EXPECT().WriteStructBegin(context.Background(), "testStruct_args").Return(err).Aft…
72 …last = protocol.EXPECT().WriteFieldBegin(context.Background(), "thing", thrift.TType(thrift.STRUCT…
79 …last = protocol.EXPECT().WriteStructBegin(context.Background(), "TestStruct").Return(err).After(la…
86 …last = protocol.EXPECT().WriteFieldBegin(context.Background(), "m", thrift.TType(thrift.MAP), int1…
93 …last = protocol.EXPECT().WriteMapBegin(context.Background(), thrift.TType(thrift.STRING), thrift.T…
100 last = protocol.EXPECT().WriteMapEnd(context.Background()).Return(err).After(last)
107 last = protocol.EXPECT().WriteFieldEnd(context.Background()).Return(err).After(last)
114 …last = protocol.EXPECT().WriteFieldBegin(context.Background(), "l", thrift.TType(thrift.LIST), int…
[all …]
Drequired_fields_test.go66 protocol := NewMockTProtocol(mockCtrl)
71 protocol.EXPECT().ReadStructBegin(context.Background()).Return("StructC", nil),
72protocol.EXPECT().ReadFieldBegin(context.Background()).Return("_", thrift.TType(thrift.STOP), int1…
73 protocol.EXPECT().ReadStructEnd(context.Background()).Return(nil),
76 err := testStruct.Read(context.Background(), protocol)
92 protocol.EXPECT().ReadStructBegin(context.Background()).Return("StructC", nil),
93protocol.EXPECT().ReadFieldBegin(context.Background()).Return("I", thrift.TType(thrift.I32), int16…
94 protocol.EXPECT().ReadI32(context.Background()).Return(int32(1), nil),
95 protocol.EXPECT().ReadFieldEnd(context.Background()).Return(nil),
96protocol.EXPECT().ReadFieldBegin(context.Background()).Return("_", thrift.TType(thrift.STOP), int1…
[all …]
/thrift-3.4.0/lib/cpp/test/
DThrifttReadCheckTests.cpp45 using apache::thrift::protocol::TBinaryProtocol;
46 using apache::thrift::protocol::TCompactProtocol;
47 using apache::thrift::protocol::TJSONProtocol;
48 using apache::thrift::protocol::TType;
63 using namespace apache::thrift::protocol;
149 std::shared_ptr<TBinaryProtocol> protocol(new TBinaryProtocol(transport)); in BOOST_AUTO_TEST_CASE() local
152 TType elemType = apache::thrift::protocol::T_STOP; in BOOST_AUTO_TEST_CASE()
153 TType elemType1 = apache::thrift::protocol::T_STOP; in BOOST_AUTO_TEST_CASE()
155 protocol->writeListBegin(list.elemType_, list.size_); in BOOST_AUTO_TEST_CASE()
156 protocol->writeListEnd(); in BOOST_AUTO_TEST_CASE()
[all …]
/thrift-3.4.0/lib/rb/spec/
Dserializer_spec.rb32 protocol = Thrift::BaseProtocol.new(double("transport"))
33 expect(protocol).to receive(:write_struct_begin).with("SpecNamespace::Hello")
34 expect(protocol).to receive(:write_field_begin).with("greeting", Thrift::Types::STRING, 1)
35 expect(protocol).to receive(:write_string).with("Good day")
36 expect(protocol).to receive(:write_field_end)
37 expect(protocol).to receive(:write_field_stop)
38 expect(protocol).to receive(:write_struct_end)
40 allow(protocol_factory).to receive(:get_protocol).and_return(protocol)
54 protocol = Thrift::BaseProtocol.new(double("transport"))
55 expect(protocol).to receive(:read_struct_begin).and_return("SpecNamespace::Hello")
[all …]
/thrift-3.4.0/lib/go/thrift/
Dheader_protocol.go37 protocol TProtocol member
67 protocol: p,
136 p.protocol = newProto
138 return p.protocol.WriteMessageBegin(ctx, name, typeID, seqID)
142 if err := p.protocol.WriteMessageEnd(ctx); err != nil {
149 return p.protocol.WriteStructBegin(ctx, name)
153 return p.protocol.WriteStructEnd(ctx)
157 return p.protocol.WriteFieldBegin(ctx, name, typeID, id)
161 return p.protocol.WriteFieldEnd(ctx)
165 return p.protocol.WriteFieldStop(ctx)
[all …]
/thrift-3.4.0/lib/php/lib/Serializer/
DTBinarySerializer.php44 $protocol = new TBinaryProtocolAccelerated($transport);
47 $protocol,
52 $protocol->isStrictWrite()
55 $protocol->readMessageBegin($unused_name, $unused_type, $unused_seqid);
57 $object->write($protocol);
59 $protocol->getTransport()->flush();
67 $protocol = new TBinaryProtocolAccelerated($transport);
73 $protocol->writeMessageBegin('', TMessageType::REPLY, 0);
74 $protocolTransport = $protocol->getTransport();
78 …return thrift_protocol_read_binary($protocol, $class_name, $protocol->isStrictRead(), $buffer_size…
[all …]
/thrift-3.4.0/lib/cpp/src/thrift/async/
DTAsyncDispatchProcessor.h38 std::shared_ptr<protocol::TProtocol> in, in process()
39 std::shared_ptr<protocol::TProtocol> out) override { in process()
40 protocol::TProtocol* inRaw = in.get(); in process()
41 protocol::TProtocol* outRaw = out.get(); in process()
55 protocol::TMessageType mtype; in process()
64 if (mtype != protocol::T_CALL && mtype != protocol::T_ONEWAY) { in process()
77 protocol::TMessageType mtype; in processFast()
81 if (mtype != protocol::T_CALL && mtype != protocol::T_ONEWAY) { in processFast()
91 apache::thrift::protocol::TProtocol* in,
92 apache::thrift::protocol::TProtocol* out,
[all …]
/thrift-3.4.0/lib/cpp/src/thrift/
DTDispatchProcessor.h36 bool process(std::shared_ptr<protocol::TProtocol> in, in process()
37 std::shared_ptr<protocol::TProtocol> out, in process()
39 protocol::TProtocol* inRaw = in.get(); in process()
40 protocol::TProtocol* outRaw = out.get(); in process()
54 protocol::TMessageType mtype; in process()
63 if (mtype != protocol::T_CALL && mtype != protocol::T_ONEWAY) { in process()
74 protocol::TMessageType mtype; in processFast()
78 if (mtype != protocol::T_CALL && mtype != protocol::T_ONEWAY) { in processFast()
89 virtual bool dispatchCall(apache::thrift::protocol::TProtocol* in,
90 apache::thrift::protocol::TProtocol* out,
[all …]
/thrift-3.4.0/lib/netstd/Tests/Thrift.IntegrationTests/Protocols/
DProtocolsOperationsTests.cs60 var protocol = tuple.Item2; in WriteReadMessage_Test()
62 await protocol.WriteMessageBeginAsync(expected, default); in WriteReadMessage_Test()
63 await protocol.WriteMessageEndAsync(default); in WriteReadMessage_Test()
67 var actualMessage = await protocol.ReadMessageBeginAsync(default); in WriteReadMessage_Test()
68 await protocol.ReadMessageEndAsync(default); in WriteReadMessage_Test()
94 var protocol = tuple.Item2; in WriteReadStruct_Test()
96 await protocol.WriteStructBeginAsync(expected, default); in WriteReadStruct_Test()
97 await protocol.WriteStructEndAsync(default); in WriteReadStruct_Test()
101 var actual = await protocol.ReadStructBeginAsync(default); in WriteReadStruct_Test()
102 await protocol.ReadStructEndAsync(default); in WriteReadStruct_Test()
[all …]
/thrift-3.4.0/lib/cpp/src/thrift/processor/
DStatsProcessor.h41 virtual bool process(std::shared_ptr<apache::thrift::protocol::TProtocol> piprot, in process()
42 std::shared_ptr<apache::thrift::protocol::TProtocol> poprot, in process()
48 apache::thrift::protocol::TMessageType mtype; in process()
52 if (mtype != apache::thrift::protocol::T_CALL && mtype != apache::thrift::protocol::T_ONEWAY) { in process()
69 apache::thrift::protocol::TType ftype; in process()
74 if (ftype == apache::thrift::protocol::T_STOP) { in process()
93 void printAndPassToBuffer(apache::thrift::protocol::TType ftype) { in printAndPassToBuffer()
95 case apache::thrift::protocol::T_BOOL: { in printAndPassToBuffer()
102 case apache::thrift::protocol::T_BYTE: { in printAndPassToBuffer()
109 case apache::thrift::protocol::T_I16: { in printAndPassToBuffer()
[all …]

12345678910>>...22