Re: [twsocket] TWSocket. Receiving data very quickly hangs app

2008-09-03 Thread Arno Garrels
Anton Sviridov wrote: > I wrote > > while not Terminated do > clients[0].MessageLoop; > > and launched 10 clients through localhost - everything is OK, > application doesn''t even slow down. Though cpu usage is near 85%, > but it works! Localhost connections are not a real test case si

Re: [twsocket] TWSocket. Receiving data very quickly hangs app

2008-09-03 Thread Anton Sviridov
...and, sorry for flooding, thank you for an example of custom message loop, it is very useful! -- Regards, Anton -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be

Re: [twsocket] TWSocket. Receiving data very quickly hangs app

2008-09-03 Thread Anton Sviridov
> Only one message loop is required per thread. Thanks, Ando! This is not a sort of obvious things, I even haven''t an idea of it. I wrote while not Terminated do clients[0].MessageLoop; and launched 10 clients through localhost - everything is OK, application doesn''t even slow down

Re: [twsocket] TWSocket. Receiving data very quickly hangs app

2008-09-03 Thread Arno Garrels
Anton Sviridov wrote: > So, if I want to implement several sockets in a single threads, how > do I perform a message loops on each of them? Only one message loop is required per thread. If you write your own message loop like below you would be able post and handle custom messages sent with PostT

Re: [twsocket] TWSocket. Receiving data very quickly hangs app

2008-09-03 Thread Anton Sviridov
So, if I want to implement several sockets in a single threads, how do I perform a message loops on each of them? This procedure TMyThread.Execute; begin WSocket1 := TWSocket.Create(nil); try Assign event handlers and properties.. WSocket1.Connect;

Re: [twsocket] TWSocket. Receiving data very quickly hangs app

2008-09-03 Thread Anton Sviridov
Arno Garrels wrote: > On very fast transfers it happens that certain messages are delayed. > To keep your GUI responsive you can run ICS in a single worker thread. Yes, I'm starting to understand it )). I'll try to implement one thread. > Localhost connections are very, very fast, that's no real