public async Task BindAsync() { await _transport.BindAsync(); // Make sure continuations don't need to post to xunit's MaxConcurrencySyncContext. _acceptLoopTask = Task.Run(AcceptLoopAsync); }
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)); }
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()); }