From e21e35c768f1fb26b20532f66fc77b2cb836bc19 Mon Sep 17 00:00:00 2001 From: sta Date: Sun, 28 Sep 2014 13:53:54 +0900 Subject: [PATCH] Fix for issue #76, added the WaitTime property to the HttpServer class --- websocket-sharp/Server/HttpServer.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/websocket-sharp/Server/HttpServer.cs b/websocket-sharp/Server/HttpServer.cs index 5cd82589..b30e5d00 100644 --- a/websocket-sharp/Server/HttpServer.cs +++ b/websocket-sharp/Server/HttpServer.cs @@ -350,6 +350,29 @@ namespace WebSocketSharp.Server } } + /// + /// Gets or sets the wait time for the response to the WebSocket Ping or Close. + /// + /// + /// A that represents the wait time. The default value is + /// the same as 1 second. + /// + public TimeSpan WaitTime { + get { + return _services.WaitTime; + } + + set { + var msg = _state.CheckIfStartable () ?? value.CheckIfValidWaitTime (); + if (msg != null) { + _logger.Error (msg); + return; + } + + _services.WaitTime = value; + } + } + /// /// Gets the access to the WebSocket services provided by the server. ///