Provides data for the IConnectionlessMessenger.ConnectionlessMessageReceived event.
Inheritance: System.EventArgs
Exemplo n.º 1
0
        protected virtual void OnConnectionlessMessageReceived(object sender, ConnectionlessMessageEventArgs e)
        {
            var mhandlers = GetConnectionlessHandlers(e.Message);

            if (mhandlers == null)
            {
                return;
            }

            for (int i = 0; i < mhandlers.Count; ++i)
            {
                mhandlers[i] (e);
            }
        }
Exemplo n.º 2
0
        private void ClientQueryServer(ConnectionlessMessageEventArgs e)
        {
            var msg = (QueryServerMessage)e.Message;

            if (!msg.ServerInfoOnly && !context.GetPermission (PermissionName.RequestChannelList)) {
                var denied = new PermissionDeniedMessage (GablarskiMessageType.QueryServer);
                e.Messenger.SendConnectionlessMessageAsync (denied, e.From);

                return;
            }

            var result = new QueryServerResultMessage();

            if (!msg.ServerInfoOnly) {
                result.Channels = this.context.ChannelsProvider.GetChannels();
                result.Users = this.users.ToList();
            }

            result.ServerInfo = GetServerInfo();
            e.Messenger.SendConnectionlessMessageAsync (result, e.From);
        }
Exemplo n.º 3
0
 private void OnConnectionlessMessageReceivedGlobal(object sender, ConnectionlessMessageEventArgs e)
 {
     this.mqueue.Enqueue (e);
     this.wait.Set();
 }
Exemplo n.º 4
0
        protected virtual void OnConnectionlessMessageReceived(object sender, ConnectionlessMessageEventArgs e)
        {
            var mhandlers = GetConnectionlessHandlers (e.Message);
            if (mhandlers == null)
                return;

            for (int i = 0; i < mhandlers.Count; ++i)
                mhandlers[i] (e);
        }
Exemplo n.º 5
0
 private void OnConnectionlessMessageReceivedGlobal(object sender, ConnectionlessMessageEventArgs e)
 {
     this.mqueue.Enqueue(e);
     this.wait.Set();
 }