Exemple #1
0
        private void InitializeClientSocket()
        {
            ClientSocketParams csp = SocketOutboundAdapterConfigMgt.SocketOutAdapterConfig.ClientSocketParams;

            _ClientSocket = new ClientSocket(Program.Log);
            _ClientSocket.CodePageName = csp.CodePageName;

            _ClientSocket.ServerIP       = csp.ServerIP;
            _ClientSocket.ServerPort     = csp.ServerPort;
            _ClientSocket.SendTimeout    = csp.SendTimeout;
            _ClientSocket.ReceiveTimeout = csp.RecTimeout;
        }
Exemple #2
0
        private void Initialization()
        {
            InitCodePage();

            clientSocketParams = SocketOutboundAdapterConfigMgt.SocketOutAdapterConfig.ClientSocketParams;
            channelSet         = SocketOutboundAdapterConfigMgt.SocketOutAdapterConfig.OutboundChanels;
            LUTableSet         = SocketOutboundAdapterConfigMgt.SocketOutAdapterConfig.LookupTables;

            #region ClientSocketParameters
            this.txtCallbackIP.Text       = clientSocketParams.CallbackIP.ToString();
            this.txtCallbackPort.Value    = clientSocketParams.CallbackPort;
            this.txtServerIP.Text         = clientSocketParams.ServerIP.ToString();
            this.txtServerPort.Text       = clientSocketParams.ServerPort.ToString();
            this.txtInterval.Text         = SocketOutboundAdapterConfigMgt.SocketOutAdapterConfig.OutGeneralParams.TimerInterval.ToString();
            this.txtConnectTimeout.Text   = clientSocketParams.ConnectTimeout.ToString();
            this.txtTryCount.Text         = clientSocketParams.ConnectTryCount.ToString();
            this.txtReceiveTimeout.Text   = clientSocketParams.RecTimeout.ToString();
            this.txtSendTimeout.Text      = clientSocketParams.SendTimeout.ToString();
            this.cbCodePage.SelectedIndex = EncodingPage.GetIndex(clientSocketParams.CodePageName);
            #endregion
            #region Channel
            if (channelSet != null)
            {
                if (channelSet.Count != 0)
                {
                    ShowChannelSetInformation();
                }     //It sign that there is no channel in the channelset
            }
            else
            {
                //Never occur as SocketOutAdapterConfigMgt.SocketOutAdapterConfig was be constuctured
                channelSet = new XCollection <SocketOutChannel>();
            }
            #endregion
            #region Look up tables
            if (LUTableSet != null)
            {
                if (LUTableSet.Count != 0)
                {
                    ShowLUTableSetInformation();
                }
            }
            else
            {
                //Never occur as SocketOutAdapterConfigMgt.SocketOutAdapterConfig was be constuctured
                LUTableSet = new XCollection <LookupTable>();
            }
            #endregion
        }