示例#1
0
        //static xperdex.eltanin.protocol.PROT_IP_BLOCK_GAME prior_game_block;
        static void ProcessGameBlock(Protocols.SlaveCaller.message msg)
        {
            if (msg == null)
            {
                return;
            }

#if adsfasfd
            if (prior_game_block == null || msg.date != prior_game_block.date)
            {
                if (DateTime.TryParse(msg.date / 100 + "/" + msg.date % 100 + "/" + DateTime.Today.Year, out Bingoday))
                {
                }
                else
                {
                    Log.log("Wtf.");
                }
                //Bingoday.Month = msg.date / 100;
                //Bingoday.Day = msg.date % 100;
            }
            if (prior_game_block == null || msg.date != prior_game_block.date)
            {
                if (BingodayChanged != null)
                {
                    BingodayChanged(Bingoday);
                }
            }

            if (prior_game_block == null || msg.session != prior_game_block.session)
            {
                if (SessionChanged != null)
                {
                    SessionChanged(msg.session);
                }
            }

            if (prior_game_block == null || msg.game != prior_game_block.game)
            {
                if (GameChanged != null)
                {
                    GameChanged(msg.game);
                }
            }

            prior_game_block = msg;
#endif
        }
示例#2
0
        static void read_complete(IAsyncResult result)
        //stateObject st;
        {
            // message back should be a process and machine ID of someone that ran a process
            IPEndPoint from = null;

            byte[] buffer = socket.EndReceive(result, ref from);

            Protocols.SlaveCaller.message msg = Protocols.SlaveCaller.ReadMessage(buffer);

            //xperdex.eltanin.protocol.message msg = xperdex.eltanin.protocol.ReadMessage( buffer );
            //BinaryReader br = new BinaryReader( buffer );
            if (msg != null)
            {
                ProcessGameBlock(msg);
            }

            socket.BeginReceive(read_complete, null);
        }