Exemple #1
0
 internal StreamHandle(
     LoopContext loop,
     uv_handle_type handleType)
     : base(loop, handleType)
 {
     this.Pipeline = new Pipeline(this);
 }
Exemple #2
0
        internal Async(LoopContext loop, Action <Async> callback)
            : base(loop, uv_handle_type.UV_ASYNC)
        {
            Contract.Requires(callback != null);

            this.Callback = state => callback.Invoke((Async)state);
        }
        internal ScheduleHandle(LoopContext loop, uv_handle_type handleType)
        {
            Contract.Requires(loop != null);

            HandleContext initialHandle = NativeMethods.Initialize(loop.Handle, handleType, this);

            if (initialHandle == null)
            {
                throw new InvalidOperationException($"Initialize {handleType} for loop {loop.Handle} failed.");
            }

            this.handle     = initialHandle;
            this.HandleType = handleType;
        }
Exemple #4
0
 internal Timer(LoopContext loop)
     : base(loop, uv_handle_type.UV_TIMER)
 {
 }
Exemple #5
0
 internal WorkHandle(LoopContext loop, uv_handle_type handleType)
     : base(loop, handleType)
 {
 }
Exemple #6
0
 public Loop()
 {
     this.handle = new LoopContext();
 }
Exemple #7
0
 internal Idle(LoopContext loop)
     : base(loop, uv_handle_type.UV_IDLE)
 {
 }
Exemple #8
0
 internal Check(LoopContext loop)
     : base(loop, uv_handle_type.UV_CHECK)
 {
 }
Exemple #9
0
 internal Tcp(LoopContext loop)
     : base(loop, uv_handle_type.UV_TCP)
 {
 }
Exemple #10
0
 internal Prepare(LoopContext loop)
     : base(loop, uv_handle_type.UV_PREPARE)
 {
 }