示例#1
0
        /// <summary>
        ///     Process the data only on this specific client.
        /// </summary>
        /// <param name="data">The data to process.</param>
        /// <param name="clientEpicId">The epic user who sent the data.</param>
        /// <param name="channel">The channel that the data was sent on.</param>
        internal override void OnReceiveData(byte[] data, ProductUserId clientEpicId, int channel)
        {
            if (!Connected || _initialWait)
            {
                return;
            }

            var clientQueuePoolData = new EpicMessage(clientEpicId, channel, InternalMessage.Data, data);

            if (Logger.logEnabled)
            {
                if (Transport.transportDebug)
                {
                    DebugLogger.RegularDebugLog(
                        $"[Client] - Queue up message Event Type: {clientQueuePoolData.EventType} data: {BitConverter.ToString(clientQueuePoolData.Data)}");
                }
            }

            QueuedData.Enqueue(clientQueuePoolData);
        }
示例#2
0
 public System.Threading.Tasks.Task SendMessageToGroup(string groupName, EpicMessage message)
 {
     return(Clients.Group(groupName).SendAsync("ReceiveMessage", message));
 }