Exemplo n.º 1
0
 public void Connect()
 {
     this.Setup(PinConfigurationManager.HsmConfig.HsmHost, PinConfigurationManager.HsmConfig.HsmPort, null, null);
     this._thales = new ThalesSim.Core.TCP.WorkerClient(new System.Net.Sockets.TcpClient(this._hostname, this._port));
     this._thales.MessageArrived += new ThalesSim.Core.TCP.WorkerClient.MessageArrivedEventHandler(thales_MessageArrived);
     this._thales.InitOps();
 }
Exemplo n.º 2
0
        private void thales_MessageArrived(ThalesSim.Core.TCP.WorkerClient sender, ref byte[] b, int len)
        {
            string s = string.Empty;

            for (int i = 0; i < len; i++)
            {
                s = s + Convert.ToChar(b[i]);
            }

            this._thalesData = s;
        }