Re: [twsocket] Large amount of OnDataAvailable calls

2006-11-03 Thread Markus Humm
Hello, procedure TServerSocket.MyOnSessionAvailable(Sender: TObject; ErrCode: Word); var news:TSocket; begin if not assigned(asoc) then begin try { We need to accept the client connection } NewS := self.Accept; { And then associate this

Re: [twsocket] Large amount of OnDataAvailable calls

2006-11-03 Thread Arno Garrels
Markus Humm wrote: errors first. I don't even accept the connection if asoc is already assigned and without it being in a thread it worked reliably. Given that property ListenBacklog is set to 0 it actually would work. Otherwise (default value of ListenBacklog is 5), after the first trigger of

Re: [twsocket] Large amount of OnDataAvailable calls

2006-11-02 Thread Markus Humm
Hello, here's my OnSessionAvailable. I use TWSocket insteat of TWSocketServer because it already works and I don't want to change that part of my program. procedure TServerSocket.MyOnSessionAvailable(Sender: TObject; ErrCode: Word); var news:TSocket; begin if not assigned(asoc) then

Re: [twsocket] Large amount of OnDataAvailable calls

2006-11-02 Thread Arno Garrels
Markus Humm wrote: procedure TServerSocket.MyOnSessionAvailable(Sender: TObject; ErrCode: Word); var news:TSocket; begin if not assigned(asoc) then begin try { We need to accept the client connection } NewS := self.Accept; { And then associate this

Re: [twsocket] Large amount of OnDataAvailable calls andtimer/frozen main thread

2006-11-01 Thread Arno Garrels
Markus Humm wrote: Hello, I tried the direct calling of the timer without succes (I think some of the affected VCL-components [like ListView and JvSimScope from JEDI] need windows messages for their updating as well). I also tried the thread based approach but without success. If I pack

Re: [twsocket] Large amount of OnDataAvailable calls and timer/frozen main thread

2006-10-31 Thread Markus Humm
Hello, I tried the direct calling of the timer without succes (I think some of the affected VCL-components [like ListView and JvSimScope from JEDI] need windows messages for their updating as well). I also tried the thread based approach but without success. If I pack the ICS communication into

Re: [twsocket] Large amount of OnDataAvailable calls and timer/frozenmain thread

2006-10-27 Thread Francois PIETTE
I've come to 2 ideas: - set up a secondary thread for ICS (but I already have several threads running... ;-)) That's OK. You may set the thread priority above normal level so that the network I/O doesn't catch all available CPU. It looks like you have a CPU bound case. - in