Ejemplo n.º 1
0
        public void Complete(Action callback)
        {
            IAsyncWatcher completeWatcher = null;

            completeWatcher = Context.CreateAsyncWatcher(delegate {
                completeWatcher.Dispose();
                callback();
            });
            completeWatcher.Start();
            Stream.End(completeWatcher.Send);
        }
Ejemplo n.º 2
0
        public void Dispose()
        {
            Socket = null;

            if (Stream != null)
            {
                Stream.Dispose();
                Stream = null;
            }

            if (end_watcher != null)
            {
                end_watcher.Dispose();
                end_watcher = null;
            }

            if (completeWatcher != null)
            {
                completeWatcher.Dispose();
                completeWatcher = null;
            }
        }
Ejemplo n.º 3
0
 public void Dispose()
 {
     asyncWatcher.Dispose();
 }