private void ini()
 {
     /*if (connectcount < 1)*/ connectcount = 1;
     for (int i = 0; i < connectcount; i++)
     {
         icSocket ics = new icSocket(app, binPath);
         ics.ReceivedEvent     += new icSocket.ReceiveDelegate(ics_ReceivedEvent);
         ics.GetDataEvent      += new icSocket.GetDataDelegate(ics_GetDataEvent);
         ics.ExceptionEvent    += new icSocket.ExceptionDelegate(ics_ExceptionEvent);
         ics.updateClientEvent += new icSocket.updateClientDelegate(ics_updateClientEvent);
         ics.SendStatusEvent   += new icSocket.SendStatusDelegate(ics_SendStatusEvent);
         sockets.Add(ics);
     }
     ReceivedThread = new Thread(ReceivedThreadStart);
     ReceivedThread.IsBackground = true;
     ReceivedThread.Start();
     SendstatusThread = new Thread(SendstatusThreadStart);
     SendstatusThread.IsBackground = true;
     SendstatusThread.Start();
 }
Esempio n. 2
0
 private void ini()
 {
     /*if (connectcount < 1)*/ connectcount = 1;
     for (int i = 0; i < connectcount; i++)
     {
         icSocket ics = new icSocket(app, binPath);
         ics.ReceivedEvent += new icSocket.ReceiveDelegate(ics_ReceivedEvent);
         ics.GetDataEvent += new icSocket.GetDataDelegate(ics_GetDataEvent);
         ics.ExceptionEvent += new icSocket.ExceptionDelegate(ics_ExceptionEvent);
         ics.updateClientEvent += new icSocket.updateClientDelegate(ics_updateClientEvent);
         ics.SendStatusEvent += new icSocket.SendStatusDelegate(ics_SendStatusEvent);
         sockets.Add(ics);
     }
     ReceivedThread = new Thread(ReceivedThreadStart);
     ReceivedThread.IsBackground = true;
     ReceivedThread.Start();
     SendstatusThread = new Thread(SendstatusThreadStart);
     SendstatusThread.IsBackground = true;
     SendstatusThread.Start();
 }