> TWSocket.close;
> TWSocket.Free;
>
> is okay to terminate and release it?

A gracefull close is nomally done by calling Shutdown. Then when 
OnSessionClosed event is fired, you
can call Release to terminate the closing and free the component. 
OnSessionClosed event is fired
when the remote socket agree to terminate the session. If it doesn't after some 
time, you should
call Abort.

--
[EMAIL PROTECTED]
http://www.overbyte.be


----- Original Message ----- 
From: "Humm, Markus" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Wednesday, February 01, 2006 11:45 AM
Subject: Re: [twsocket] Problems with TWSocket.close and DLL


> Hello,
>
> to the socket hanging on close.
> There are different threads involved.
>
> The communication dll has one thread which only polls messages.
> That one shouldn't be the problem.
>
> The dll using that communication dll has one thread per socket
> (max. at most 10). Freing the socket is requested by this dll
> when it's execute method terminates.
>
> So I don't think I need threadattach in the communication
> dll. Shared Mem is not used because so Strings are used. All params
> passed between these dlls are either numbers or pchars (which get copied to
> strings internally).
>
> So whare's the problem with my approach? Only TWSocket.close seems to hang.
> I will test a bit more now, maybe I find a solution but I don't know
> what causes the hang. But normally the sequence
> TWSocket.close;
> TWSocket.Free;
>
> is okay to terminate and release it?
>
> Greetings
>
> Markus
> -- 
> 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

-- 
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

Reply via email to