根据域名(配置指定的),系统IP(自动解析的,16进制字符串),时间戳(1970年到当前的小时数)和自增编号组成
コード例 #1
0
        public virtual void InitializeClient(ClientConfig clientConfig)
        {
            _clientConfig = clientConfig ?? new ClientConfig();

            _hostName   = NetworkInterfaceManager.GetLocalHostName();
            _statistics = new DefaultMessageStatistics();
            _sender     = new TcpMessageSender(_clientConfig, _statistics);
            _sender.Initialize();
            _factory          = new MessageIdFactory();
            _statusUpdateTask = new StatusUpdateTask(_statistics);

            _taggedTransactions = new ConcurrentDictionary <string, ITaggedTransaction>();

            // initialize domain and ip address
            _factory.Initialize(_clientConfig.Domain.Id);

            // start status update task
            ThreadPool.QueueUserWorkItem(_statusUpdateTask.Run);
            Logger.Info("Thread(StatusUpdateTask) started.");
        }
コード例 #2
0
        public virtual void InitializeClient(ClientConfig clientConfig)
        {
            _clientConfig = clientConfig ?? new ClientConfig();

            _hostName = NetworkInterfaceManager.GetLocalHostName();
            _statistics = new DefaultMessageStatistics();
            _sender = new TcpMessageSender(_clientConfig, _statistics);
            _sender.Initialize();
            _factory = new MessageIdFactory();
            _statusUpdateTask = new StatusUpdateTask(_statistics);

            _taggedTransactions = new ConcurrentDictionary<string, ITaggedTransaction>();

            // initialize domain and ip address
            _factory.Initialize(_clientConfig.Domain.Id);

            // start status update task
            ThreadPool.QueueUserWorkItem(_statusUpdateTask.Run);
            Logger.Info("Thread(StatusUpdateTask) started.");
        }