ng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be
- Original Message -
From: "Humm, Markus" <[EMAIL PROTECTED]>
To: "ICS support mailing"
Sent: Friday, February 03, 2006 2:06 PM
Subject: [twsocket] Problems with TWSocket.close and DLL
> Hello,
>
>
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
>> Yes because you don't need threads with ICS :) you can easily exchange
>> data with multiple concurent at the same time.
>
> Yes I can, I know. But that doesn't multiply my capacity for
> simultaniously
> processing the packets. I split it up into this threaded scenario because
> data processin
Hello,
> Hi Marcus,
>
> I've been following your problem and I believe that the
> problem you have
> is because you are trying to use a dll with only a little
> multi-threading experience. One of the reasons people avoid threads is
> that it requires a lot of reading, development time,
> experi
Hello Markus,
> How can I solve my problem? Which thread does the socket belon to
> now? Does it belong to the thread in
Use GetCurrentThreadID to find out the thread context of the code.
Check this where the TWSocket is created and where you Destroy it. Check
this also in some of the TWSocket e
Hi Marcus,
I've been following your problem and I believe that the problem you have
is because you are trying to use a dll with only a little
multi-threading experience. One of the reasons people avoid threads is
that it requires a lot of reading, development time, experience and when
something go
> >> Humm, Markus wrote:
> >>> 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.
> >>
> >> And the socket has been _created in method execute as well?
> >> How do you achieve
> > > And the socket has been _created in method execute as well?
> > > How do you achieve that client sockets run in the client thread
> > > if not using ThreadAttach/ThreadDetach?
> > Hm, no it is created before execute. And no thread attach/detach is used.
> > It works so far until the point wh
Hello Markus,
> This is done because each thread does more things than just sending
> receiving.
The message was meant because many people think they need a thread per
communication TWSocket channel. So I assume you have your own reason to
have a thread.
What you can do is Create and destroy TWS
> > And the socket has been _created in method execute as well?
> > How do you achieve that client sockets run in the client thread
> > if not using ThreadAttach/ThreadDetach?
> Hm, no it is created before execute. And no thread attach/detach is used.
> It works so far until the point when I try t
Humm, Markus wrote:
>> -Ursprüngliche Nachricht-
>> Von: Arno Garrels [mailto:[EMAIL PROTECTED]
>> Gesendet: Mittwoch, 1. Februar 2006 12:10
>> An: ICS support mailing
>> Betreff: Re: [twsocket] Problems with TWSocket.close and DLL
>>
>>
>
> -Ursprüngliche Nachricht-
> Von: Arno Garrels [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 1. Februar 2006 12:10
> An: ICS support mailing
> Betreff: Re: [twsocket] Problems with TWSocket.close and DLL
>
>
> Humm, Markus wrote:
> > The dll using
> -Ursprungliche Nachricht-
> Von: Dod [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 1. Februar 2006 12:02
> An: ICS support mailing
> Betreff: Re: [twsocket] Problems with TWSocket.close and DLL
>
>
> Hello Markus,
>
> Why do you use one thread per soc
ry 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 proble
Humm, Markus wrote:
> 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.
And the socket has been _created in method execute as well?
How do you achieve that client sockets run in the
Hello Markus,
Why do you use one thread per socket ? TSWocket is event driven so you
can connect to 500 servers if you want within same thread.
For polling messages, if you .mulithread:=true then the TWSocket will
create its own message queue.
HM> Hello,
HM> to the socket hanging on close.
HM>
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
> The DLL has a data module which has one single TWSocket for all incomming data
> and for each outgoing connection a TWSocket is created dynamically. The
> instance of this
> socket is stored in a TObjectList together with other relevant information.
> When the first connection is opened a sepera
Humm, Markus wrote:
> The DLL has a data module which has one single TWSocket for all incomming
> data and for each outgoing connection a TWSocket is created dynamically.
> The instance of this socket is stored in a TObjectList together with
> other relevant information.
Sounds like you re-inven
Hello,
Think that ICS is fully asynchronous and event driven, it's a
different approach comparing to Indy or other Socket components and
also comparaing to RS232 programming where synchronous mode is usual.
With ICS (server or client mode) you can make or receive thousand of
connexi
Hello Markus,
Why not .free the socket thru a message sent in .OnClose event ? This
is a better way than doing a sleep(x) that tends to defeat
asynchronous ICS model, you' better thing in term of events.
Also you could not free you TWSocket but re-use later as you maintain
a TObjectL
Hello,
I'm writing a application in D2006 and build a communication dll for it.
The communications dll encapsulates different communication methods (for USB,
ethernet...).
Ethernet communication is done via ICS TWSocket, the version included on the
partner cd.
The DLL has a data module which ha
22 matches
Mail list logo