bool GetReusePort() { try { var channel = (TcpServerChannel)this.Channel; var tcpListener = (TcpListener)channel.GetHandle(); return(PlatformApi.GetReusePort(tcpListener)); } catch (ObjectDisposedException ex) { throw new ChannelException(ex); } catch (SocketException ex) { throw new ChannelException(ex); } }
bool GetReusePort() { try { var channel = (INativeChannel)this.Channel; var tcpListener = (TcpListener)channel.GetHandle(); return(PlatformApi.GetReusePort(tcpListener)); } catch (ObjectDisposedException ex) { ThrowHelper.ThrowChannelException(ex); } catch (SocketException ex) { ThrowHelper.ThrowChannelException(ex); } return(false); }