Esempio n. 1
0
 internal UVStream(Loop loop, IntPtr handle)
     : base(loop, handle)
 {
     read_cb_unix = read_callback_u;
     read_cb_win  = read_callback_w;
     stream       = (uv_stream_t *)(handle.ToInt64() + Handle.Size(HandleType.UV_HANDLE));
 }
Esempio n. 2
0
        unsafe internal Pipe(Loop loop, bool interProcessCommunication)
            : base(loop, HandleType.UV_NAMED_PIPE)
        {
            int r = NativeMethods.uv_pipe_init(loop.NativeHandle, NativeHandle, interProcessCommunication ? 1 : 0);

            Ensure.Success(r);
            pipe_t = (uv_pipe_t *)(this.NativeHandle.ToInt64() + Handle.Size(HandleType.UV_STREAM));
        }
Esempio n. 3
0
 internal UVStream(Loop loop, HandleType type)
     : this(loop, Handle.Size(type))
 {
 }
Esempio n. 4
0
 internal UVStream(Loop loop, IntPtr handle)
     : base(loop, handle)
 {
     stream = (uv_stream_t *)(handle.ToInt64() + Handle.Size(HandleType.UV_HANDLE));
 }
Esempio n. 5
0
 internal Handle(Loop loop, HandleType type)
     : this(loop, Handle.Size(type))
 {
 }
Esempio n. 6
0
 unsafe internal Pipe(Loop loop, bool interProcessCommunication)
     : base(loop, HandleType.UV_NAMED_PIPE)
 {
     uv_pipe_init(loop.NativeHandle, NativeHandle, interProcessCommunication ? 1 : 0);
     pipe_t = (uv_pipe_t *)(this.NativeHandle.ToInt64() + Handle.Size(HandleType.UV_NAMED_PIPE) - sizeof(uv_pipe_t));
 }
Esempio n. 7
0
 internal static IntPtr Alloc(HandleType type)
 {
     return(Alloc(Handle.Size(type)));
 }
Esempio n. 8
0
 internal HandleFileDescriptor(Loop loop, HandleType type)
     : this(loop, Handle.Size(type))
 {
 }