Пример #1
0
 public void Init(UvLoopHandle loop)
 {
     CreateMemory(
         loop.Libuv, 
         loop.ThreadId,
         loop.Libuv.req_size(Uv.RequestType.SHUTDOWN));
 }
Пример #2
0
 public void Init(UvLoopHandle loop)
 {
     var requestSize = loop.Libuv.req_size(Uv.RequestType.CONNECT);
     CreateMemory(
         loop.Libuv,
         loop.ThreadId,
         requestSize);
 }
Пример #3
0
        public void Init(UvLoopHandle loop, Action <Action <IntPtr>, IntPtr> queueCloseHandle)
        {
            CreateHandle(
                loop.Libuv,
                loop.ThreadId,
                loop.Libuv.handle_size(Uv.HandleType.TCP), queueCloseHandle);

            _uv.tcp_init(loop, this);
        }
Пример #4
0
        public void Init(UvLoopHandle loop, Action<Action<IntPtr>, IntPtr> queueCloseHandle, bool ipc = false)
        {
            CreateHandle(
                loop.Libuv, 
                loop.ThreadId,
                loop.Libuv.handle_size(Uv.HandleType.NAMED_PIPE), queueCloseHandle);

            _uv.pipe_init(loop, this, ipc);
        }
Пример #5
0
 public void Init(UvLoopHandle loop)
 {
     var requestSize = loop.Libuv.req_size(Uv.RequestType.WRITE);
     var bufferSize = Marshal.SizeOf<Uv.uv_buf_t>() * BUFFER_COUNT;
     CreateMemory(
         loop.Libuv,
         loop.ThreadId,
         requestSize + bufferSize);
     _bufs = handle + requestSize;
 }
Пример #6
0
        public void Init(UvLoopHandle loop, Action callback, Action<Action<IntPtr>, IntPtr> queueCloseHandle)
        {
            CreateMemory(
                loop.Libuv,
                loop.ThreadId,
                loop.Libuv.handle_size(Uv.HandleType.ASYNC));

            _callback = callback;
            _queueCloseHandle = queueCloseHandle;
            _uv.async_init(loop, this, _uv_async_cb);
        }
Пример #7
0
        public void Init(UvLoopHandle loop)
        {
            var requestSize = loop.Libuv.req_size(Uv.RequestType.WRITE);
            var bufferSize  = Marshal.SizeOf <Uv.uv_buf_t>() * BUFFER_COUNT;

            CreateMemory(
                loop.Libuv,
                loop.ThreadId,
                requestSize + bufferSize);
            _bufs = handle + requestSize;
        }
Пример #8
0
        public void Init(UvLoopHandle loop, Action callback, Action <Action <IntPtr>, IntPtr> queueCloseHandle)
        {
            CreateMemory(
                loop.Libuv,
                loop.ThreadId,
                loop.Libuv.handle_size(Uv.HandleType.ASYNC));

            _callback         = callback;
            _queueCloseHandle = queueCloseHandle;
            _uv.async_init(loop, this, _uv_async_cb);
        }
Пример #9
0
        private void RunLoop()
        {
            Uv = new Uv();

            Loop = new UvLoopHandle();
            Loop.Init(Uv);

            _postHandle = new UvAsyncHandle();
            _postHandle.Init(Loop, OnPost, null);

            _running.Set();

            Uv.run(Loop, 0);

            _postHandle.Reference();
            _postHandle.Dispose();

            Uv.run(Loop, 0);

            Loop.Dispose();
        }
Пример #10
0
 public static extern int uv_loop_init(UvLoopHandle handle);
Пример #11
0
 public static extern int uv_pipe_init(UvLoopHandle loop,UvPipeHandle handle,int ipc);
Пример #12
0
 public static extern int uv_async_init(UvLoopHandle loop,UvAsyncHandle handle,uv_async_cb cb);
Пример #13
0
 public static extern int uv_run(UvLoopHandle handle,int mode);
Пример #14
0
 public void walk(UvLoopHandle loop, uv_walk_cb walk_cb, IntPtr arg)
 {
     loop.Validate();
     _uv_walk(loop, walk_cb, arg);
 }
Пример #15
0
 public void tcp_init(UvLoopHandle loop, UvTcpHandle handle)
 {
     loop.Validate();
     handle.Validate();
     ThrowIfErrored(_uv_tcp_init(loop, handle));
 }
Пример #16
0
 public void stop(UvLoopHandle handle)
 {
     handle.Validate();
     _uv_stop(handle);
 }
Пример #17
0
 public static extern int uv_walk(UvLoopHandle loop, uv_walk_cb walk_cb, IntPtr arg);
Пример #18
0
 public static extern int uv_pipe_init(UvLoopHandle loop, UvPipeHandle handle, int ipc);
Пример #19
0
 public static extern int uv_tcp_init(UvLoopHandle loop, UvTcpHandle handle);
Пример #20
0
 public static extern int uv_async_init(UvLoopHandle loop, UvAsyncHandle handle, uv_async_cb cb);
Пример #21
0
 public static extern void uv_stop(UvLoopHandle handle);
Пример #22
0
 public static extern int uv_run(UvLoopHandle handle, int mode);
Пример #23
0
 public void loop_close(UvLoopHandle handle)
 {
     handle.Validate(closed: true);
     ThrowIfErrored(_uv_loop_close(handle.InternalGetHandle()));
 }
Пример #24
0
 public void run(UvLoopHandle handle, int mode)
 {
     handle.Validate();
     ThrowIfErrored(_uv_run(handle, mode));
 }
Пример #25
0
 public void loop_init(UvLoopHandle handle)
 {
     ThrowIfErrored(_uv_loop_init(handle));
 }
Пример #26
0
 public void async_init(UvLoopHandle loop, UvAsyncHandle handle, uv_async_cb cb)
 {
     loop.Validate();
     handle.Validate();
     ThrowIfErrored(_uv_async_init(loop, handle, cb));
 }
Пример #27
0
 public void async_init(UvLoopHandle loop, UvAsyncHandle handle, uv_async_cb cb)
 {
     loop.Validate();
     handle.Validate();
     ThrowIfErrored(_uv_async_init(loop, handle, cb));
 }
Пример #28
0
 public void pipe_init(UvLoopHandle loop, UvPipeHandle handle, bool ipc)
 {
     loop.Validate();
     handle.Validate();
     ThrowIfErrored(_uv_pipe_init(loop, handle, ipc ? -1 : 0));
 }
Пример #29
0
 public void stop(UvLoopHandle handle)
 {
     handle.Validate();
     _uv_stop(handle);
 }
Пример #30
0
 public static extern int uv_loop_init(UvLoopHandle handle);
Пример #31
0
 public void run(UvLoopHandle handle, int mode)
 {
     handle.Validate();
     ThrowIfErrored(_uv_run(handle, mode));
 }
Пример #32
0
 public static extern void uv_stop(UvLoopHandle handle);
Пример #33
0
 public void loop_init(UvLoopHandle handle)
 {
     ThrowIfErrored(_uv_loop_init(handle));
 }
Пример #34
0
 public static extern int uv_tcp_init(UvLoopHandle loop,UvTcpHandle handle);
Пример #35
0
 public void pipe_init(UvLoopHandle loop, UvPipeHandle handle, bool ipc)
 {
     loop.Validate();
     handle.Validate();
     ThrowIfErrored(_uv_pipe_init(loop, handle, ipc ? -1 : 0));
 }
Пример #36
0
 public static extern int uv_walk(UvLoopHandle loop,uv_walk_cb walk_cb,IntPtr arg);
Пример #37
0
 public void walk(UvLoopHandle loop, uv_walk_cb walk_cb, IntPtr arg)
 {
     loop.Validate();
     _uv_walk(loop, walk_cb, arg);
 }
Пример #38
0
 public void loop_close(UvLoopHandle handle)
 {
     handle.Validate(closed: true);
     ThrowIfErrored(_uv_loop_close(handle.InternalGetHandle()));
 }
Пример #39
0
 public void tcp_init(UvLoopHandle loop, UvTcpHandle handle)
 {
     loop.Validate();
     handle.Validate();
     ThrowIfErrored(_uv_tcp_init(loop, handle));
 }