예제 #1
0
        public async void Announce(InfoHash infoHash, int port)
        {
            CheckDisposed();
            Check.InfoHash(infoHash);

            try {
                await MainLoop;
                var   task = new AnnounceTask(this, infoHash, port);
                await task.ExecuteAsync();
            } catch {
                // Ignore?
            }
        }
예제 #2
0
        public async void Announce(InfoHash infoHash, int port)
        {
            CheckDisposed();
            if (infoHash is null)
            {
                throw new ArgumentNullException(nameof(infoHash));
            }

            try {
                await MainLoop;
                var   task = new AnnounceTask(this, infoHash, port);
                await task.ExecuteAsync();
            } catch {
                // Ignore?
            }
        }