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