Пример #1
0
        public Task StartAsync()
        {
            // TODO: Make idempotent
            _thread.Post(_startListeningCallback, this);

            return(_startedTcs.Task);
        }
Пример #2
0
        public async Task <UvTcpConnection> ConnectAsync()
        {
            _thread.Post(_startConnect, this);

            var connection = await _connectTcs.Task;

            return(connection);
        }
Пример #3
0
        public async Task <UvTcpConnection> ConnectAsync()
        {
            _thread.Post(_startConnect, this);

            var connection = await _connectTcs.Task;

            // Get back onto the current context
            await Task.Yield();

            return(connection);
        }