예제 #1
0
 internal StreamHandle(
     LoopContext loop,
     uv_handle_type handleType)
     : base(loop, handleType)
 {
     this.Pipeline = new Pipeline(this);
 }
예제 #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);
        }
예제 #3
0
        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;
        }
예제 #4
0
 internal Timer(LoopContext loop)
     : base(loop, uv_handle_type.UV_TIMER)
 {
 }
예제 #5
0
 internal WorkHandle(LoopContext loop, uv_handle_type handleType)
     : base(loop, handleType)
 {
 }
예제 #6
0
 public Loop()
 {
     this.handle = new LoopContext();
 }
예제 #7
0
 internal Idle(LoopContext loop)
     : base(loop, uv_handle_type.UV_IDLE)
 {
 }
예제 #8
0
 internal Check(LoopContext loop)
     : base(loop, uv_handle_type.UV_CHECK)
 {
 }
예제 #9
0
 internal Tcp(LoopContext loop)
     : base(loop, uv_handle_type.UV_TCP)
 {
 }
예제 #10
0
 internal Prepare(LoopContext loop)
     : base(loop, uv_handle_type.UV_PREPARE)
 {
 }