> - Shutdown is as follows:
> - the PID is noted
> - Socket.shutdown(1);
> - Socket.processMessages;
>
> -> one never gets into OnSessionClosed. Why?
Because the message pump is not properly called. ProcessMessages is not
equivalent to the message loop. It just process messages already in the
qu
>> > 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
>Assign all properties and events
>..
>Wsocket.Send(something);
>Wsocket.MessageLoop;
I like to put the initialization stuff into a custom message handler (i.e.
WM_THREAD_STARTUP). So just before calling MessageLoop, I post a custom
message to the thread and from
Is your problem handling byte range with dynamic content ?
--
[EMAIL PROTECTED]
http://www.overbyte.be
- Original Message -
From: "Joachim Taubitz" <[EMAIL PROTECTED]>
To:
Sent: Friday, February 03, 2006 11:39 AM
Subject: [twsocket] THttpConnection.SendStream at defined Streamoffset
>
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 BIG
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
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 (be
Hello,
it seems that I need a rewrite of this part of my
project from start on.
The idea is to have one dll for encapsulating all
communication stuff and another sitting on top of it
for handling of my special protocolls. because I have
more than one I can exchange these dlls sitting in top
as ne
Hello Markus,
> 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?
You have to have a running message pump in the Execute method of the
thread as Arno has showed. In OnSessionClosed you may post a
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 co
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 who
Last sample was with TWSocket's built in message pump.
Instead you can write your own, something like this:
procedure TMyThread.PumpMessages(WaitForMessages: Boolean);
var
HasMessage : Boolean;
Msg: TMsg;
MsgRec : TMessage;
begin
while TRUE do begin
if Terminate
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
WSock
Humm, Markus wrote:
>
> How would I implement a good message pump in that thread?
For instance (not tested)
procedure TMyThread.Execute;
begin
prepare the data to be sent
Wsocket.Create()
Assign all properties
..
Wsocket.Send(something);
Wsocket.MessageLoop;
..
cl
> -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 t
> 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:
>
> > - outp
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 stil
Hello,
i am a german guy who wants to create a UPnP MediaServer Application for my
D-Link DSM320 UPnP Streaming Client.
For this i use your ICS Components. On my Way to create my App. there was
one problem
1. At beginning of streaming MediaContent like a MPEG-File, the DSM320
send
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 de
> 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
d
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
Marku
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 eve
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 clos
Hello,
You can use OnSessionConnected. In that event you can send your
autorisation string.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Friday, February 3, 2006, 04:22, [EMAIL PROTECTED] wrote:
> hi
> this question is about your socketsp
Humm, Markus wrote:
> Hello,
>
>> Hello Markus,
>>
>>> I put some debug output in my OnSessionCLosed handler, it doesn't seem
>>> to be called. But I haven't yet debugged.
>>
>> See my other reply. If it is not fired, then eather ShutDown did not
>> work because of some exception error, or eathe
25 matches
Mail list logo