public Task StartAsync(
            string pipeName,
            ServerAddress address,
            KestrelThread thread)
        {
            _pipeName = pipeName;
            _buf      = thread.Loop.Libuv.buf_init(_ptr, 4);

            ServerAddress = address;
            Thread        = thread;

            DispatchPipe = new UvPipeHandle(Log);

            var tcs = new TaskCompletionSource <int>(this);

            Thread.Post(tcs2 => StartCallback(tcs2), tcs);
            return(tcs.Task);
        }
Example #2
0
        public Task StartAsync(
            string pipeName,
            ServiceAddress address,
            EventThread thread)
        {
            _pipeName = pipeName;
            _buf      = thread.Loop.Libuv.buf_init(_ptr, 4);

            ServerAddress     = address;
            Thread            = thread;
            ConnectionManager = new ConnectionManager(thread);

            DispatchPipe = new UvPipeHandle();

            var tcs = new TaskCompletionSource <int>(this);

            Thread.Post(state => StartCallback((TaskCompletionSource <int>)state), tcs);
            return(tcs.Task);
        }