I know how to read and all that the problem is that it seems that the events stop being generated after the first 3 events. I have Left a pretty bare wxSOCKET_INPUT clause in my select case where is just peeks 1 byte so it should keep getting the same byte over and over to test what was going on and it only gets the 1 byte 3 times then it stops trying. I have put wxMessageBoxes at the beginning and end of the input case to see how it is executed and it seems that the event is generated and then again before the 1st pass through the function has been ended.
Example:
Code: Select all
case wxSOCKET_INPUT:
{
wxMessageBox(wxT("Input Generated"),wxT("INFO"));
Sock->Peek(buffer,1);
wxMessageBox(wxT("Ended."),wxT("INFO"));
}
Input Generated
Input Generated
Input Generated
Ended
Ended
Ended
Then it stops altogether can and from what I understand since I only peek'd the bytes it should keep generating the event because I have never taken it off the socket buffer.
Can someone help me with this all I want is it to keep reading and not just stop like that I have tried all of the flags for the socket like BLOCK, NOWAIT, WAITALL etc... and nothing seemed to make any difference.