예제 #1
0
        public void ProcessRequest(Stream input, Stream output)
        {
            TTransport transport = new TStreamTransport(input,output);

            TProtocol inputProtocol = null;
            TProtocol outputProtocol = null;

            try
            {
                inputProtocol = inputProtocolFactory.GetProtocol(transport);
                outputProtocol = outputProtocolFactory.GetProtocol(transport);

                while (processor.Process(inputProtocol, outputProtocol)) { }
            }
            catch (TTransportException)
            {
                // Client died, just move on
            }
            catch (TApplicationException tx)
            {
                Console.Error.Write(tx);
            }
            catch (Exception x)
            {
                Console.Error.Write(x);
            }

            transport.Close();
        }
예제 #2
0
		public TBufferedTransport(TStreamTransport transport, int bufSize)
		{
			this.bufSize = bufSize;
			this.transport = transport;
			InitBuffers();
		}
예제 #3
0
		public TBufferedTransport(TStreamTransport transport)
			:this(transport, 1024)
		{

		}
예제 #4
0
 public TBufferedTransport(TStreamTransport transport, int bufSize)
 {
     this.bufSize   = bufSize;
     this.transport = transport;
     InitBuffers();
 }
예제 #5
0
 public TBufferedTransport(TStreamTransport transport)
     : this(transport, 1024)
 {
 }