예제 #1
0
		private bool DataReadyHandler (IntPtr channel, IOCondition condition, IntPtr data)
		{
			DataReadEventArgs args = new DataReadEventArgs (condition);
			if (data_ready != null) 
				data_ready (this, args);
			
			return args.Continue;
		}
        private void IOChannelRead(object sender, DataReadEventArgs args)
        {
            //Console.WriteLine ("IO read {0}", args.Condition);

            if ((System.IO.Stream)sender == stream.Stream)
            {
                args.Continue = AsyncRead();
            }
            else
            {
                args.Continue = false;
                stream.Close();
            }

            return;
        }
		private void IOChannelRead (object sender, DataReadEventArgs args)
		{
			//Console.WriteLine ("IO read {0}", args.Condition);

			if ( (System.IO.Stream)sender == stream.Stream)				
				args.Continue = AsyncRead ();
			else {
				args.Continue = false;
				stream.Close ();
			}

			return;
		}