Exemple #1
0
 private void ConnectGuns()
 {
     BGuns.ToList().ForEach(g => {
         string ip                                = g.IP;
         int port                                 = g.Port;
         socket                                   = new SocketConnect(ip, port);
         socket.EventConnected                   += Socket_EventConnected;
         socket.EventCommunicationed             += Socket_EventCommunicationed;
         socket.EventTighteningResultSubscribe   += Socket_EventTighteningResultSubscribe;
         socket.EventTighteningResultRecived     += Socket_EventTighteningResultRecived;
         socket.EventTighteningResultNoSubscribe += Socket_EventTighteningResultNoSubscribe;;
         socket.EventDisConnected                += Socket_EventDisConnected;
         g.connect                                = socket;
         socket.Start();
     });
 }