예제 #1
0
        internal override void OnToolboxDisconnected(SocketClosedEventArgs e)
        {
            if (ConnectionQueue.ContainsKey(e.UniqueId))
            {
                ConnectionQueue.Remove(e.UniqueId);
            }

            base.OnToolboxDisconnected(e);
        }
예제 #2
0
        protected override void OnClose(CloseEventArgs wssArgs)
        {
            base.OnClose(wssArgs);

            var level      = XenLogLevel.Info;
            var remoteHost = Context.Host;

            if (!wssArgs.WasClean)
            {
                level = XenLogLevel.Error;
            }

            var e = new SocketClosedEventArgs
            {
                Address  = Context.Host,
                UniqueId = ID
            };

            _server.OnToolboxDisconnected(e);
            _server.OnTrace(level, $"Toolbox {remoteHost} disconnected.{Environment.NewLine}Code: {wssArgs.Code}. Reason: {wssArgs.Reason}");
        }
예제 #3
0
 internal virtual void OnToolboxDisconnected(SocketClosedEventArgs e)
 {
     ToolboxDisconnected?.Invoke(this, e);
 }