Exemplo n.º 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();
        }
Exemplo n.º 2
0
		public TBufferedTransport(TStreamTransport transport, int bufSize)
		{
			this.bufSize = bufSize;
			this.transport = transport;
			InitBuffers();
		}
Exemplo n.º 3
0
		public TBufferedTransport(TStreamTransport transport)
			:this(transport, 1024)
		{

		}
Exemplo n.º 4
0
 public TBufferedTransport(TStreamTransport transport, int bufSize)
 {
     this.bufSize   = bufSize;
     this.transport = transport;
     InitBuffers();
 }
Exemplo n.º 5
0
 public TBufferedTransport(TStreamTransport transport)
     : this(transport, 1024)
 {
 }