Beispiel #1
0
func (p *Sender2Args) readField1(iprot thrift.TProtocol) error {
	p.Req = reqInfo.NewReqInfo()
	if err := p.Req.Read(iprot); err != nil {
		return fmt.Errorf("%T error reading struct: %s", p.Req)
	}
	return nil
}
Beispiel #2
0
func main() {
	transportFactory := thrift.NewTTransportFactory()
	protocolFactory := thrift.NewTBinaryProtocolFactoryDefault()
	socket, _ := thrift.NewTSocket("localhost:9091")
	transport := transportFactory.GetTransport(socket)
	transport.Open()
	client := service.NewAdServletClientFactory(transport, protocolFactory)
	req := reqInfo.NewReqInfo()
	req.SizeHight = 10
	client.Sender2(req)
}