🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #4235

Re: A Question on Sockets and DLL

#4235
From: mike
Date: Mon, 07 Mar 2005 20:24
46 lines
2651 bytes
Bob,

Thanks again for answering. I have tried to calrify a little better below.


"Bob Gonder" <notbg@notmindspring.invalid> wrote in message 
news:f67p21pil8brk4cg777ivcm87aresmjbe1@4ax.com...
> mike wrote:
>
>>> You weren't clear if the "Clients" are just several threads in a
>>> single Process, or seperate Processes.
>>
>>The Clients connect to a single process and each connection is a thread
>>within the process.
>
> Still not clear. Are you saying there are several Client processes
> connecting to a single Server process that is multi-threaded?
>
> And, is it the Clients that use the DLL or the Server?
>

The Clients connect to the server process, and the Server Process is 
multi-threaded and it is the Server that uses the DLL not the Clients.



> If the DLL hangs on to the data, or is "statefull" (remembers what it
> is doing), then all threads will see the same state/data, and you will
> likely have problems using it multi-threaded.
>

The DLL does not hold on to any data. It simply processes a request and 
sends the data back to the calling process.

>
> If the DLL hands you the data, and then doesn't remember it, then yes,
> you can save the data in your thread (local stack variable). And, if
> the code isn't reentrant, then I suppose some locking mechanism is in
> order.

So would I use the syncronize method from the thread to the call to the DLL 
and then save any necessary data in the thread local stack.

Thanks for the continued information.

Mike 
Technical Details
Message-ID: <422cb872@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!news.moat.net!newsfeed.kamp.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <422b24ec@newsgroups.borland.com> <j8bm21hiql7v0dhlde0vaemcm7a10ib71m@4ax.com> <422c5d02$1@newsgroups.borland.com> <f67p21pil8brk4cg777ivcm87aresmjbe1@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,fce3d93441a242e3
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "mike" <mfbrowne@earthlink.nnet>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <422b24ec@newsgroups.borland.com> <j8bm21hiql7v0dhlde0vaemcm7a10ib71m@4ax.com> <422c5d02$1@newsgroups.borland.com> <f67p21pil8brk4cg777ivcm87aresmjbe1@4ax.com>
Subject: Re: A Question on Sockets and DLL
Date: Mon, 7 Mar 2005 15:24:00 -0500
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: 68.204.189.169
Message-ID: <422cb872@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1110227058 68.204.189.169 (7 Mar 2005 12:24:18 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!news.moat.net!newsfeed.kamp.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail