[twsocket] closing socket socket

2006-02-03 Thread Humm, Markus
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

Re: [twsocket] still problems with terminating the socket

2006-02-03 Thread Wilfried Mestdagh
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

[twsocket] Closing socket

2006-02-03 Thread Humm, Markus
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

Re: [twsocket] closing socket socket

2006-02-03 Thread Francois Piette
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

Re: [twsocket] closing socket socket

2006-02-03 Thread Arno Garrels
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.

Re: [twsocket] still problems with terminating the socket

2006-02-03 Thread Humm, Markus
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

Re: [twsocket] still problems with terminating the socket

2006-02-03 Thread Humm, Markus
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

Re: [twsocket] closing socket socket

2006-02-03 Thread Humm, Markus
-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

Re: [twsocket] still problems with terminating the socket

2006-02-03 Thread Arno Garrels
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

[twsocket] still problems with terminating the socket

2006-02-03 Thread Humm, Markus
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

[twsocket] Problems with TWSocket.close and DLL

2006-02-03 Thread Humm, Markus
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

[twsocket] Async ICMP

2006-02-03 Thread Fastream Technologies
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

Re: [twsocket] Async ICMP

2006-02-03 Thread Guillaume MAISON
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,

[twsocket] Remember the SetWindowLong bug in WSocket?

2006-02-03 Thread Fastream Technologies
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

Re: [twsocket] closing socket socket

2006-02-03 Thread Francois PIETTE
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