Hello Markus, Seems you don't get the Event-driven way of programming, why a loop of 100ms that seems to do nothing with event it could receive ?
HM> - output a debug message to eventlog HM> - socket.shutdown(1); HM> - output a 2nd message to eventlog HM> - do this: HM> t:=GetTickCount; HM> while (GetTickCount-t < 100) do HM> begin HM> TranslateMessage(MsgRec); HM> DispatchMessage(MsgRec); HM> WaitMessage; HM> end; HM> - output a 3rd message to eventlog HM> - Socket.Release; HM> But: it doesn't even get to the 2nd message! HM> I will put a message in my OnSessionClosed event as well. HM> But I don't know why the 2nd message (and all later) aren't written. HM> The main program still hangs for some seconds. After that a 2nd click on HM> close can be done which works then (at least closes the app.) HM> Greetings HM> Markus Humm -- 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