Esempio n. 1
0
 public TBufferedTransportAsync(TTransportAsync transport, int bufSize = 1024)
 {
     if (transport == null)
         throw new ArgumentNullException("transport");
     if (bufSize <= 0)
         throw new ArgumentException("bufSize", "Buffer size must be a positive number.");
     this.transport = transport;
     this.bufSize = bufSize;
 }
Esempio n. 2
0
 protected TProtocolAsync(TTransportAsync trans)
 {
     this.trans = trans;
     this.recursionLimit = DEFAULT_RECURSION_DEPTH;
     this.recursionDepth = 0;
 }
 public TProcessorAsync GetProcessor(TTransportAsync trans, TServerAsync server = null)
 {
     return processor_;
 }
Esempio n. 4
0
 public virtual TTransportAsync GetTransport(TTransportAsync trans)
 {
     return trans;
 }
Esempio n. 5
0
 public TProtocolAsync GetProtocol(TTransportAsync trans)
 {
     return new TCompactProtocolAsync(trans);
 }
Esempio n. 6
0
 public TCompactProtocolAsync(TTransportAsync trans)
     : base(trans)
 {
     ttypeToCompactType[(int)TType.Stop] = Types.STOP;
     ttypeToCompactType[(int)TType.Bool] = Types.BOOLEAN_TRUE;
     ttypeToCompactType[(int)TType.Byte] = Types.BYTE;
     ttypeToCompactType[(int)TType.I16] = Types.I16;
     ttypeToCompactType[(int)TType.I32] = Types.I32;
     ttypeToCompactType[(int)TType.I64] = Types.I64;
     ttypeToCompactType[(int)TType.Double] = Types.DOUBLE;
     ttypeToCompactType[(int)TType.String] = Types.BINARY;
     ttypeToCompactType[(int)TType.List] = Types.LIST;
     ttypeToCompactType[(int)TType.Set] = Types.SET;
     ttypeToCompactType[(int)TType.Map] = Types.MAP;
     ttypeToCompactType[(int)TType.Struct] = Types.STRUCT;
 }