m.Http.Backend.Tcp.WebSocketSession.CloseSession C# (CSharp) Method

CloseSession() public method

public CloseSession ( ushort statusCode, string reason = null ) : void
statusCode ushort
reason string
return void
        public void CloseSession(ushort statusCode=0, string reason=null)
        {
            lock (stateLock)
            {
                if (closed)
                {
                    return;
                };

                closed = true;
            }

            try
            {
                SendClose(statusCode, reason);
            }
            catch
            {
                return;
            }
            finally
            {
                CloseQuiety();
            }
        }