diff --git a/websocket-sharp/Server/WebSocketBehavior.cs b/websocket-sharp/Server/WebSocketBehavior.cs
index 99a0b18c..2f7b9b07 100644
--- a/websocket-sharp/Server/WebSocketBehavior.cs
+++ b/websocket-sharp/Server/WebSocketBehavior.cs
@@ -622,6 +622,79 @@ namespace WebSocketSharp.Server
_websocket.CloseAsync ();
}
+ ///
+ /// Closes the WebSocket connection for a session asynchronously with
+ /// the specified code and reason.
+ ///
+ ///
+ ///
+ /// This method does not wait for the close to be complete.
+ ///
+ ///
+ /// This method does nothing if the current state of the connection is
+ /// Closing or Closed.
+ ///
+ ///
+ ///
+ ///
+ /// A that represents the status code indicating
+ /// the reason for the close.
+ ///
+ ///
+ /// The status codes are defined in
+ ///
+ /// Section 7.4 of RFC 6455.
+ ///
+ ///
+ ///
+ ///
+ /// A that represents the reason for the close.
+ ///
+ ///
+ /// The size must be 123 bytes or less in UTF-8.
+ ///
+ ///
+ ///
+ /// The session has not started yet.
+ ///
+ ///
+ ///
+ /// is less than 1000 or greater than 4999.
+ ///
+ ///
+ /// -or-
+ ///
+ ///
+ /// The size of is greater than 123 bytes.
+ ///
+ ///
+ ///
+ ///
+ /// is 1010 (mandatory extension).
+ ///
+ ///
+ /// -or-
+ ///
+ ///
+ /// is 1005 (no status) and there is reason.
+ ///
+ ///
+ /// -or-
+ ///
+ ///
+ /// could not be UTF-8-encoded.
+ ///
+ ///
+ protected void CloseAsync (ushort code, string reason)
+ {
+ if (_websocket == null) {
+ var msg = "The session has not started yet.";
+ throw new InvalidOperationException (msg);
+ }
+
+ _websocket.CloseAsync (code, reason);
+ }
+
///
/// Calls the method with the specified message.
///