diff --git a/websocket-sharp/Server/WebSocketServer.cs b/websocket-sharp/Server/WebSocketServer.cs index ee22f9ea..7e44fcff 100644 --- a/websocket-sharp/Server/WebSocketServer.cs +++ b/websocket-sharp/Server/WebSocketServer.cs @@ -840,6 +840,14 @@ namespace WebSocketSharp.Server _state = ServerState.Stop; } + + /// + /// Allows the server to be bound to an address that is already in use. + /// + public void SetReuseAddress() + { + _listener.Server.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1); + } #endregion }