public async Task BindAsync()
        {
            await _transport.BindAsync();

            // Make sure continuations don't need to post to xunit's MaxConcurrencySyncContext.
            _acceptLoopTask = Task.Run(AcceptLoopAsync);
        }
Пример #2
0
        public async Task BindAsync()
        {
            await _transport.BindAsync();

            try
            {
                await _broadcast.BindAsync();
            }
            catch (AddressInUseException)
            {
                _trace.AddressInUse();
            }

            _trace.Bind(_transport.EndPoint);

            await _broadcast.SendToAsync(ToBuffer("Broadcast:" + _id + ":" + _transport.EndPoint.Port));
        }
Пример #3
0
        public async Task BindAsync()
        {
            await _transport.BindAsync();

            try
            {
                await _broadcast.BindAsync();
            }
            catch (AddressInUseException)
            {
                _trace.AddressInUse();
            }

            _trace.Bind(_transport.EndPoint);

            var socketError = await _broadcast.SendToAsync(new ArraySegment <byte>(ToBytes("Broadcast:" + _id + ":" + _transport.EndPoint.Port)));

            if (socketError != SocketError.Success)
            {
                _trace.LogError($"broadcast.SendToAsync() failed: {socketError}");
            }
        }
 public Task BindAsync()
 {
     return(_transport.BindAsync());
 }