Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-02-20 Thread Wilfried Mestdagh
Hello Jack, > So when I resume, > instead of setting the option, I can still use the Resume() > function to resume notification? I'm not sure I understeand completely what you ask but: - Pause will stop notification from winsock. If there is already data received then OnDataAvailable will keep

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-02-20 Thread Jack
Hello Francois, Thanks for the reply. I'll try that. So when I resume, instead of setting the option, I can still use the Resume() function to resume notification? -- Best regards, Jack Sunday, February 19, 2006, 2:20:54 AM, you wrote: >> I find that calling pause in OnSessionConnected() is ef

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-02-19 Thread Francois PIETTE
> I find that calling pause in OnSessionConnected() is effective. > But calling pause in OnClientDataAvailable() does not work. > OnClientDataAvailable() keeps getting fired. Any ideas? Maybe your socket already received data when you pause it. Pause only affect winsock notification. It stops noti

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-02-19 Thread Arno Garrels
Jack wrote: > Hello Francois, > > I find that calling pause in OnSessionConnected() is effective. > But calling pause in OnClientDataAvailable() does not work. > OnClientDataAvailable() keeps getting fired. Any ideas? You may have paused the server socket instead of the TWSocketClient? Arno Gar

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-02-18 Thread Jack
Hello Francois, I find that calling pause in OnSessionConnected() is effective. But calling pause in OnClientDataAvailable() does not work. OnClientDataAvailable() keeps getting fired. Any ideas? -- Best regards, Jack Sunday, January 22, 2006, 10:33:21 AM, you wrote: >>> Maybe use Pause/Resume

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-01-23 Thread Jack
Hello Francois, > You can't ignore OnDataavailable event ! Got it. >> > There is a flag FPaused but it is not exposed as a property. >> Oh, will you be able to expose it? I can modify the source >> code for now but I think it's useful when Pause and Resume >> is exposed. > Not really. You can

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-01-22 Thread Francois Piette
> >>> Maybe use Pause/Resume ? > > > It suppress async notification. So you don't receive events anymore but I/O > > continue as much as winsock can, for example filling his receive buffer. > > Got it. Wouldn't this be similar to ignoring OnDataAvailable event You can't ignore OnDataavailable even

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-01-22 Thread Wilfried Mestdagh
Hello Jack, >> It suppress async notification. So you don't receive events anymore but I/O >> continue as much as winsock can, for example filling his receive buffer. > Got it. Wouldn't this be similar to ignoring OnDataAvailable event > and is vulnerable to DOS attack? If you call Pauze then wi

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-01-22 Thread Wilfried Mestdagh
Hello Jack, > if there is data available but do not want to actually remove > the data from twsocket's buffer. This is because I want to You can use Pauze / Resume but there is also a very simple way to do it, just set wsoNoReceiveLoop in SocketOptions to True and dont Receive in OnDataAvailable,

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-01-22 Thread Jack
Hello Francois, >>> Maybe use Pause/Resume ? > It suppress async notification. So you don't receive events anymore but I/O > continue as much as winsock can, for example filling his receive buffer. Got it. Wouldn't this be similar to ignoring OnDataAvailable event and is vulnerable to DOS attack

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-01-22 Thread Francois PIETTE
>> Maybe use Pause/Resume ? > > Oh, I didn't even know these two methods. So Pause will stop > all network connectivity on that socket until it's resumed? It suppress async notification. So you don't receive events anymore but I/O continue as much as winsock can, for example filling his receive b

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-01-22 Thread Jack
Hello Francois, >> At some point I'd like to know >> if there is data available but do not want to actually remove >> the data from twsocket's buffer. This is because I want to >> open a remote socket and make sure it's in wsConnected state, >> then I'll retrieve data and send it through the remot

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-01-22 Thread Francois PIETTE
> Is there a way to tell the number of bytes available without > actually retrieving the data? There is RcvdCount but due to winsock limitation, it is not always accurate. > At some point I'd like to know > if there is data available but do not want to actually remove > the data from twsocket's b

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-01-22 Thread Jack
Sent: Sunday, January 22, 2006 5:25 AM > Subject: [twsocket] OnDataAvailable called before shutdown with no data >> Hello Francois and all, >> >> I use telnet as client to connect to a twsocketserver, >> after connecting to it, without sending any data from >> the c

Re: [twsocket] OnDataAvailable called before shutdown with no data

2006-01-22 Thread Francois PIETTE
<= 0. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: "Jack" <[EMAIL PROTECTED]> To: Sent: Sunday, January 22, 2006 5:25 AM Subject: [twsocket] OnDataAvailable called b

[twsocket] OnDataAvailable called before shutdown with no data

2006-01-21 Thread Jack
Hello Francois and all, I use telnet as client to connect to a twsocketserver, after connecting to it, without sending any data from the client (do not type anything in telnet) I call shutdown(1) on all the client sockets. After this, although there is no data received, the client socket's OnDataA