Exemplo n.º 1
0
        public Rede(CIDSysR30 objIDSysR30, string ip, int porta, TextBox log /*, CSocketClient socket = null*/)
        {
            this.IP    = ip;
            this.Porta = porta;
            this.Log   = log;

            try
            {
                this.objIDSysR30     = objIDSysR30;
                this.objSocketClient = new CSocketClient(IP, Porta);
            }
            catch (Exception exError)
            {
                this.AddLog(exError.Message);
            }
        }
Exemplo n.º 2
0
        public override bool Connect(int Terminal)
        {
            try
            {
                // this.objIDSysR30 = objIDSysR30;
                this.objSocketClient = new CSocketClient(TerminalDados.IP, TerminalDados.Porta);

                this.objSocketClient.Connect();

                // return this.Connection_Verification();
            }
            catch (Exception ex)
            {
                log.AddLog(Consts.ERRO_ENVIO_COMANDO);
                return(false);
            }
        }