Exemple #1
0
        public override void mantainOpenChanel()
        {
            vectorInformacionStream = vectorInformacion.GetStream();
            BinaryFormatter binewuprpoieqwrtckckjrkjkr = new BinaryFormatter();

            while (true)
            {
                try
                {
                    if (vectorInformacion.Available > 0)
                    {
                        NetInformation infi = binewuprpoieqwrtckckjrkjkr.Deserialize(vectorInformacionStream) as NetInformation;
                        onInfoReseived(infi);
                        //onSendErrooor("resivido: " + infi.enviadoId + ", " + infi.comando);
                    }
                }
                catch (Exception e)
                {
                    onSendErrooor(e.Message + ", " + e.StackTrace.ToString());
                    try
                    {
                        vectorInformacionStream = vectorInformacion.GetStream();
                    }
                    catch (Exception erc)
                    {
                        onSendErrooor(erc.Message + ", " + erc.StackTrace.ToString());
                    }
                }
            }
        }
Exemple #2
0
        public override void sendData(NetInformation info)
        {
            try
            {
                BinaryFormatter binryu = new BinaryFormatter();
                binryu.Serialize(vectorInformacionStream, info);
                //onSendErrooor("enviado " + info.enviadoId + ", " + info.comando);
            }
            catch (Exception e)
            {
                try

                {
                    onSendErrooor("error con el mensaje " + info._gamesStatus + "estado, " + info.comando + " Comando, " + info.enviadoId + " ID de el enviado, " + info.contentOfEnviado + "y  : " + e.Message + ", " + e.StackTrace.ToString());



                    vectorInformacionStream = vectorInformacion.GetStream();
                }
                catch (Exception erc)
                {
                    onSendErrooor(e.Message + ", " + e.StackTrace.ToString());
                }
            }
        }
Exemple #3
0
 protected virtual void onInfoReseived(NetInformation obj)
 {
     if (infoReseived != null)
     {
         infoReseived(obj);
     }
 }
Exemple #4
0
        public override void mantainOpenChanel()
        {
            comandoStream = comandos.GetStream();
            BinaryFormatter binareador = new BinaryFormatter();


            while (true)
            {
                try
                {
                    if (comandos.Available > 0)
                    {
                        NetInformation neterds = binareador.Deserialize(comandoStream) as NetInformation;


                        onInfoReseived(neterds);
                        //onSendErrooor("mensaje resivido");
                    }
                }
                catch (Exception e)
                {
                    onSendErrooor(e.Message + ", " + e.StackTrace.ToString());
                    try
                    {
                        comandoStream = comandos.GetStream();
                    }
                    catch (Exception erc)
                    {
                        onSendErrooor(erc.Message + ", " + erc.StackTrace.ToString());
                    }
                }
            }
        }
Exemple #5
0
 public abstract void sendData(NetInformation info);