> The app. does something like this: > > repeat > send something; > wait some ms; > until ende = true;
This is bad design considering you are using an asynchonous component. You must replace any loop by a cascade of events. Just like any normal GUI program: you have a running message pump (you never see it but it is in the forms unit). Everything else is triggered by messages turned to events by the VCL. You never wait for the user to click on a button or a menu item. Your app just sit in his message loop and when the user clicks on something, the corresponding event handler is triggered (because of the message windows sent as result of user activity). You must do the same with async sockets. You send something and you never wait for it to be sent, when it is sent, the OnDataSent event is triggered. You never wait for incomming data: the ondataavailable is triggered when data is ready to be read. And so on... -- [EMAIL PROTECTED] http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be