public Task Close(CloseOpt closeOpt) { if (closeOpt.CloseType == CloseType.Close) { Shutdown(SocketShutdown.Both); } else { Shutdown(closeOpt.ShutdownType); } return(NaiveUtils.CompletedTask); }
public Task Close(CloseOpt closeOpt) { if (closeOpt.CloseType == CloseType.Close) { return(BaseStream.Close()); } else if (closeOpt.CloseType == CloseType.Shutdown) { return(BaseStream.Shutdown(closeOpt.ShutdownType)); } else { throw new ArgumentOutOfRangeException(nameof(closeOpt)); } }
public Task Close(CloseOpt closeOpt) { Task[] tasks = allStreams.Select(x => x.Close(closeOpt)).ToArray(); return(Task.WhenAll(tasks)); }
public Task Close(CloseOpt closeOpt) { throw new NotImplementedException(); }