Example #1
0
        internal override void OnToolboxConnected(SocketConnectedEventArgs e)
        {
            if (!ConnectionQueue.ContainsKey(e.UniqueId))
            {
                ConnectionQueue.Add(e.UniqueId, e.Address);
            }

            base.OnToolboxConnected(e);
        }
Example #2
0
        protected override void OnOpen()
        {
            base.OnOpen();

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

            _server.OnToolboxConnected(e);
            _server.OnTrace(XenLogLevel.Info, $"Toolbox {Context.Host} connected.");

            if (_server.ConnectionQueue.Count > 1)
            {
                _server.OnTrace(XenLogLevel.Warn, "Disconnecting Toolbox. Multiple toolboxes cannot be connected to the designer.");
                Context.WebSocket.Close();
            }
        }
Example #3
0
 internal virtual void OnToolboxConnected(SocketConnectedEventArgs e)
 {
     ToolboxConnected?.Invoke(this, e);
 }