Hello,
I tried something different now, but without success yet.
After looking at which thread ids where involved I got the following
results:
- the socket is created in one thread
- the other thread is sending data over the socket, which works like a
charm
- the other thread then requests a
Hello Markus,
Okay, exception can be ruled out, the shutdown call is within try /
except and
I have a output in the except clause showing the exception. This doesn't
fire.
There is something wrong that we cannot see. Consider one of your
previous mails:
- output a debug message to
Hello again,
one more thought:
after calling shutdown, do I need to poll windows messages?
If yes, how to do it properly and in such a way that it only
polls as long as needed?
At the time the socket is closed there is another thread which
only polls messages. Is this enough?
Greetings
So I called DetachThread before Attach Thread, but now I get the
exception that the socket cannot be detached.
You can detach a socket from a thread only when you call ThreadDetach within
the same thread context
which called TreadAttach (or the creating thread context if no attach has been
Humm, Markus wrote:
Now I tried to attach the socket to the new thread just before calling
shutdown.
I got the exception then taht one cannot attach a socket which isn't
detached.
So I called DetachThread before Attach Thread, but now I get the
exception that the
socket cannot be detached.
Hello,
after moving the creation of the sockets in the execute method of the
thread which sends and initiates the closing of the communication
channel
the thing closed like a charm!
Now there is only the problem if the communication doesn't close and the
communication dll tries to close the
Hello Markus,
Okay, exception can be ruled out, the shutdown call is within try /
except and
I have a output in the except clause showing the exception.
This doesn't
fire.
There is something wrong that we cannot see. Consider one of your
previous mails:
- output a debug
-Ursprüngliche Nachricht-
Von: Francois Piette [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 3. Februar 2006 11:21
An: ICS support mailing
Betreff: Re: [twsocket] closing socket socket
So I called DetachThread before Attach Thread, but now I get the
exception that the socket
Or better try something like this (not tested)
procedure TMyThread.Execute;
begin
prepare the data to be sent
Wsocket := TWsocket.Create(nil);
try
Assign all properties and events
..
Wsocket.Send(something);
Wsocket.MessageLoop;
finally
Hello,
I had changed the code now so that the socket is created within the context of
the thread
(veryfied by GetCurrentThreadID) at start of execute and closing is initiated
at the end of
execute (same threadID). In the communication DLL (not the one which contains
the thread but the one
Hello,
sorry, pressed the wrong button.
I had changed the code now so that the socket is created within the context of
the thread
(veryfied by GetCurrentThreadID) at start of execute and closing is initiated
at the end of
execute (same threadID). In the communication DLL (not the one which
Hello,
I want to ping a list of servers (in parallel if possible) but without
threads, in the main thread. Currently I have some IdICMP code and when I am
disconnected from a host, it stalls for the timeout period. Is async ICMP
possible with ICS? If not, is there an API limitation for this
Fastream Technologies a écrit :
Hello,
I want to ping a list of servers (in parallel if possible) but without
threads, in the main thread. Currently I have some IdICMP code and when I am
disconnected from a host, it stalls for the timeout period. Is async ICMP
possible with ICS? If not,
Hello,
That bug caused a lot of frustration here. Now the problem is resolved for
FTP and web servers with my fix BUT for the reverse proxy, there is a window
leakage that cannot be detected by CodeGuard. It seems the problem is in
THttpCli destructor. XWindowDealloc returns true but I have
So I called DetachThread before Attach Thread, but now I get the
exception that the socket cannot be detached.
You can detach a socket from a thread only when you call
ThreadDetach within the same thread context
which called TreadAttach (or the creating thread context if
no attach has
15 matches
Mail list logo