Ejemplo n.º 1
0
        void StartGetNewPacket()
        {
            RecState state = new RecState();

            state.IsPacketLength = true;
            state.Data           = new byte[4];
            state.PacketCount    = PacketCount;
            PacketCount++;
#if DEBUG
            TempPackets.Add(state);
#endif
            S.BeginReceive(state.Data, 0, 4, SocketFlags.None, new AsyncCallback(ReceiveCallback), state);
        }
Ejemplo n.º 2
0
        void StartGetNewPacket()
        {
            RecState state = new RecState();

            state.IsPacketLength = true;
            state.Data           = new byte[4];
            state.PacketCount    = PacketCount;
            PacketCount++;
#if DEBUG
            TempPackets.Add(state);
#endif
            try
            {
                S.BeginReceive(state.Data, 0, 4, SocketFlags.None, new AsyncCallback(ReceiveCallback), state);
            }
            catch
            {
                OnServerOutput("Error: Failed To BeginRecieve");
            }
        }