예제 #1
0
        private void NotityfyOutgoingUserDataEvent(OutgoingPackage package)
        {
            if (this.UserDataOutgoing != null)
            {
                var args = new UserDataOutgoingEventArgs(package);

                this.UserDataOutgoing.GetInvocationList().ToList().ForEach(handler =>
                {
                    try
                    {
                        handler.DynamicInvoke(null, args);
                    }
                    catch (System.Exception)
                    {
                    }
                });
            }
        }
예제 #2
0
        private void SendOutgoingPackage(OutgoingPackage package)
        {
            package.DestID.ToList().ForEach(remoteID =>
            {
                try
                {
                    var saiID = this.BuildSaiConnectionID(_rsspConfig.LocalID, remoteID);

                    var theSaiConnection = this.GetSaiConnection(saiID);

                    if (theSaiConnection != null && theSaiConnection.Connected)
                    {
                        theSaiConnection.SendUserData(package);
                    }
                }
                catch (System.Exception ex)
                {
                    LogUtility.Error(ex.ToString());
                }
            });
        }
예제 #3
0
        public void Send(OutgoingPackage package)
        {
            _productCacheSending.AddTail(package);

            this.CheckOutgoingCacheThreshold();
        }