Exemplo n.º 1
0
        //public static T CreateNew<T>(USSDTcpListenerConfigurationSection ussdTcpListenerConfigurationSection)
        //    where T : USSDTCPListener, new()
        //{
        //    USSDTCPListener result = new T();
        //    result.name = ussdTcpListenerConfigurationSection.Name;
        //    result.address = ussdTcpListenerConfigurationSection.Address;
        //    result.port = ussdTcpListenerConfigurationSection.Port;
        //    result.sendBufferSize = ussdTcpListenerConfigurationSection.SendBufferSize;
        //    result.sendTimeout = ussdTcpListenerConfigurationSection.SendTimeout;
        //    result.receiveBufferSize = ussdTcpListenerConfigurationSection.ReceiveBufferSize;
        //    result.receiveTimeout = ussdTcpListenerConfigurationSection.ReceiveTimeout;
        //    return result as T;
        //}
        #endregion

        #region Public Methods
        public USSDTCPListener(USSDTcpListenerConfigurationSection ussdTcpListenerConfigurationSection)
        {
            this.AutoReconnectWhenConnectionIsLost = ussdTcpListenerConfigurationSection.AutoReconnectWhenConnectionIsLost;
            this.address           = ussdTcpListenerConfigurationSection.Address;
            this.port              = ussdTcpListenerConfigurationSection.Port;
            this.sendBufferSize    = ussdTcpListenerConfigurationSection.SendBufferSize;
            this.sendTimeout       = ussdTcpListenerConfigurationSection.SendTimeout;
            this.receiveBufferSize = ussdTcpListenerConfigurationSection.ReceiveBufferSize;
            this.receiveTimeout    = ussdTcpListenerConfigurationSection.ReceiveTimeout;
            this.name              = ussdTcpListenerConfigurationSection.Name;
            this.packetTerminator  = System.Text.Encoding.UTF8.GetBytes(ussdTcpListenerConfigurationSection.PacketTerminator);
            this.mobileNetwork     = (MobileNetworks.MobileNetwork)Enum.Parse(typeof(MobileNetworks.MobileNetwork), ussdTcpListenerConfigurationSection.MobileNetwork, true);
            this.pingInterval      = ussdTcpListenerConfigurationSection.PingInterval;
        }
Exemplo n.º 2
0
 public MtnUSSDTCPListener(USSDTcpListenerConfigurationSection ussdTcpListenerConfigurationSection)
     : base(ussdTcpListenerConfigurationSection)
 {
     this.ussdTcpListenerConfigurationSection = ussdTcpListenerConfigurationSection;
 }