Re: [twsocket] ASyncReceive and wsoNoReceiveLoop

2007-12-06 Thread Arno Garrels
Jake Traynham wrote: Wilfried, 3. Put a loop in my DataAvailable event that will do a Receive until I get -1 back. This would probably be the easiest to implement for me. No never do that. Don't set wsoReceiveLoop. If something is still (or again) in receiving winsock buffer when you

Re: [twsocket] ASyncReceive and wsoNoReceiveLoop

2007-12-04 Thread Jake Traynham
Hi Arno, Thanks for the insight. More questions below: Arno Garrels wrote: Jake Traynham wrote: So, it seems that for every time ASyncReceive looped, there would still be a message (FD_Read??) being put in the queue to call it again, which would call my DataAvailable event again,

Re: [twsocket] ASyncReceive and wsoNoReceiveLoop

2007-12-04 Thread Wilfried Mestdagh
Hello Jake, However, I would like this code to work/receive as fast as possible. The comment in the code where wsoNoReceiveLoop was introduced says that this option gives lower resource usage with really fast LAN and large transfers. Does that mean it's faster, or just uses less memory? In

Re: [twsocket] ASyncReceive and wsoNoReceiveLoop

2007-12-04 Thread Paul
No never do that. Don't set wsoReceiveLoop. If something is still (or again) in receiving winsock buffer when you leave OnDataAvailable then it will trigger again in a loop. I don't agree with this. I had troubles with a httpserver crashing when large files were transmitted on a high speed

Re: [twsocket] ASyncReceive and wsoNoReceiveLoop

2007-11-29 Thread Arno Garrels
Jake Traynham wrote: So, it seems that for every time ASyncReceive looped, there would still be a message (FD_Read??) being put in the queue to call it again, which would call my DataAvailable event again, but there wouldn't be any data to read because ASyncReceive had already looped to

Re: [twsocket] ASyncReceive and wsoNoReceiveLoop

2007-11-29 Thread Wilfried Mestdagh
Hello Jake, attempt to do a Receive, which would return -1 along with the Would Block winsock error. You don't have to handle GetLastError. Just check the Error argument in every event. The 'Would block' thing is internally handled by TWSocket. If Receive returns 0 or -1 then just exit the

[twsocket] ASyncReceive and wsoNoReceiveLoop

2007-11-28 Thread Jake Traynham
Hello all, I'm using ICS version 6.06 with Turbo C++ Explorer 2006. I had been fighting a problem where my DataAvailable event was being called twice as many times (minus 1) as actually needed. Since I've been using the ICS components for many, many years now, I obviously started

Re: [twsocket] ASyncReceive and wsoNoReceiveLoop

2007-11-28 Thread [EMAIL PROTECTED]
: Subject : RE: [twsocket] ASyncReceive and wsoNoReceiveLoop Hello all, I'm using ICS version 6.06 with Turbo C++ Explorer 2006. I had been fighting a problem where my DataAvailable event was being called twice as many times (minus 1) as actually needed. Since I've been using the ICS