Click here to Skip to main content
15,888,610 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can we remove specific node in the XML file by LINQ? Pin
Mohammad Dayyan20-Jun-08 7:20
Mohammad Dayyan20-Jun-08 7:20 
GeneralRe: How can we remove specific node in the XML file by LINQ? Pin
leppie20-Jun-08 8:05
leppie20-Jun-08 8:05 
GeneralRe: How can we remove specific node in the XML file by LINQ? Pin
Mohammad Dayyan20-Jun-08 9:09
Mohammad Dayyan20-Jun-08 9:09 
AnswerRe: How can we remove specific node in the XML file by LINQ? Pin
Mohammad Dayyan20-Jun-08 9:13
Mohammad Dayyan20-Jun-08 9:13 
QuestionPacket issues Pin
see_seA20-Jun-08 5:15
see_seA20-Jun-08 5:15 
AnswerRe: Packet issues Pin
leppie20-Jun-08 5:34
leppie20-Jun-08 5:34 
AnswerRe: Packet issues Pin
leppie20-Jun-08 5:37
leppie20-Jun-08 5:37 
GeneralRe: Packet issues Pin
see_seA20-Jun-08 5:52
see_seA20-Jun-08 5:52 
As far as I can tell, I get the error after executing the following commands:

In the OnAccept method..
byte[] bufData = new byte[1024];
clientSocket.BeginReceive(bufData, 0, bufData.Length, SocketFlags.None, new AsyncCallback(OnReceive),
                          new object[] {clientSocket, bufData});


In the OnReceive method..

Socket clientSocket = null;
            Data msgReceived = null;
            byte[] bufData = new byte[1024];
            bool bypass = false;
            ClientInfo cInfo = null;

            try
            {
                bool blInvalidClient = false;

                try
                {
                    object[] oData = (object[]) ar.AsyncState;
                    clientSocket = (Socket) oData[0];
                    bufData = (byte[]) oData[1];
                    clientSocket.EndReceive(ar);

                    //Console.WriteLine(clientList.Count);
                }
                catch (SocketException)
                {
                    blInvalidClient = true;
                }

                if (!blInvalidClient)
                {
                    //Transform the array of bytes received from the user into an
                    //intelligent form of object Data
                    msgReceived = Packet.PacketReceived(bufData);
...


The Packet.PacketReceived method returns new Data(bufData). I've added traces in that constructor and there is something incorrect happening. All clients that communicate use the same Data class to convert the info into a byte[] so it's not as if I'm sending an arb string of bytes to the socket.

But the weird thing is that this only ever happens when I sent lots of packets to the socket at once.
GeneralRe: Packet issues Pin
see_seA20-Jun-08 6:04
see_seA20-Jun-08 6:04 
GeneralRe: Packet issues Pin
leppie20-Jun-08 7:01
leppie20-Jun-08 7:01 
GeneralRe: Packet issues Pin
see_seA20-Jun-08 7:05
see_seA20-Jun-08 7:05 
GeneralRe: Packet issues Pin
see_seA20-Jun-08 7:56
see_seA20-Jun-08 7:56 
QuestionTransparency On Parent Form . Pin
unitecsoft20-Jun-08 4:58
unitecsoft20-Jun-08 4:58 
AnswerRe: Transparency On Parent Form . Pin
see_seA20-Jun-08 5:16
see_seA20-Jun-08 5:16 
Questioninserting data SQLCommand C# - am I missing something? Pin
laziale20-Jun-08 4:18
laziale20-Jun-08 4:18 
AnswerRe: inserting data SQLCommand C# - am I missing something? Pin
User 665820-Jun-08 4:25
User 665820-Jun-08 4:25 
GeneralRe: inserting data SQLCommand C# - am I missing something? Pin
laziale20-Jun-08 4:32
laziale20-Jun-08 4:32 
GeneralRe: inserting data SQLCommand C# - am I missing something? Pin
User 665820-Jun-08 4:36
User 665820-Jun-08 4:36 
GeneralRe: inserting data SQLCommand C# - am I missing something? Pin
laziale20-Jun-08 4:39
laziale20-Jun-08 4:39 
GeneralRe: inserting data SQLCommand C# - am I missing something? Pin
User 665820-Jun-08 4:39
User 665820-Jun-08 4:39 
GeneralRe: inserting data SQLCommand C# - am I missing something? Pin
laziale20-Jun-08 4:43
laziale20-Jun-08 4:43 
GeneralRe: inserting data SQLCommand C# - am I missing something? Pin
laziale20-Jun-08 5:01
laziale20-Jun-08 5:01 
GeneralRe: inserting data SQLCommand C# - am I missing something? Pin
User 665820-Jun-08 5:11
User 665820-Jun-08 5:11 
AnswerRe: inserting data SQLCommand C# - am I missing something? Pin
leppie20-Jun-08 4:29
leppie20-Jun-08 4:29 
GeneralRe: inserting data SQLCommand C# - am I missing something? Pin
laziale20-Jun-08 4:31
laziale20-Jun-08 4:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.