public bool close(ThriftHandle outThrift) { send_close(outThrift); return recv_close(); }
public byte[] read(ThriftHandle handle, long offset, int size) { send_read(handle, offset, size); return recv_read(); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Struct) { Handle = new ThriftHandle(); Handle.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case -1: if (field.Type == TType.I64) { Offset = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case -2: if (field.Type == TType.I32) { Size = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Struct) { Handle = new ThriftHandle(); Handle.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case -1: if (field.Type == TType.String) { Data = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 0: if (field.Type == TType.Struct) { Success = new ThriftHandle(); Success.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 1: if (field.Type == TType.Struct) { Ouch = new ThriftIOException(); Ouch.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public bool write(ThriftHandle handle, byte[] data) { send_write(handle, data); return recv_write(); }
public void send_write(ThriftHandle handle, byte[] data) { oprot_.WriteMessageBegin(new TMessage("write", TMessageType.Call, seqid_)); write_args args = new write_args(); args.Handle = handle; args.Data = data; args.Write(oprot_); oprot_.WriteMessageEnd(); oprot_.Transport.Flush(); }
public void send_read(ThriftHandle handle, long offset, int size) { oprot_.WriteMessageBegin(new TMessage("read", TMessageType.Call, seqid_)); read_args args = new read_args(); args.Handle = handle; args.Offset = offset; args.Size = size; args.Write(oprot_); oprot_.WriteMessageEnd(); oprot_.Transport.Flush(); }
public void send_close(ThriftHandle outThrift) { oprot_.WriteMessageBegin(new TMessage("close", TMessageType.Call, seqid_)); close_args args = new close_args(); args.OutThrift = outThrift; args.Write(oprot_); oprot_.WriteMessageEnd(); oprot_.Transport.Flush(); }