示例#1
0
        public Task <bool> AuthAsync(string password)
        {
            _other.AuthAsync(password);
            var bytes = Encoding.UTF8.GetBytes($"AUTH {password}\r\n");
            var task  = CreateTask(null, TaskCreationOptions.RunContinuationsAsynchronously);

            LockSend();
            _taskBuffer.Append(task);
            _sender.WriteAsync(bytes);
            ReleaseSend();
            return(task);
        }