🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TCustomWinSocket Lock()!!!

#4318
From: Hans Galema
Date: Sat, 05 Mar 2005 12:08
45 lines
3003 bytes
qyte wrote:

> It could be just NULL, why do you stuck on such details. 

As you have problems with your code and asking us the reason
for them you might expect some questions. Now we do not
know if it is a detail or just the cause of. So then we ask.

You could prevent such question by better explaining what your
app should do and what the program flow is.

> I told That 
> this works but not when Both the client and the server send data at the 
> same time and wait then to receive the corresponding answer. 

I already told you also that we cannot comment on that before we
see how you handle the code around SendBuf() and ReceiveBuf().

 > There are
> not two instances. let's say that i am using it from my house and 
> connect with my friend 300 miles away. How is that not understood.

So there are two instances of your program indeed. One
instance acts as a server and the other as a client. Apparently
the user can choose if the app behaves like a client or a server.
It would have helped if you had told that rigth from the start.

> NOW do you know if i somehow can tell at a single moment if another 
> sock[t] t!=current, is sending or reiceving data? because i think the 
> mess is due to the winsock.

No the winsock is not te be blamed.

You are using both TServerSocket and all TClienSockets in non-blocking
mode ? (You could have told that before).

Winsicks can send all together (well threads on one CPU). But in
your application only one TClientSocket can send at the same time
and there is no sending and receiving at the same time.

Obviously there is something in your code that is not programmed well.

Thaks for trimming by the way. Go on trimming.

Hans.
Technical Details
Message-ID: <4229a193@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!newshosting.com!nx02.iad01.newshosting.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4228f8c1$1@newsgroups.borland.com> <42290e8b$1@newsgroups.borland.com> <42297c51$1@newsgroups.borland.com> <42298b47$1@newsgroups.borland.com> <42299308@newsgroups.borland.com> <42299621$1@newsgroups.borland.com> <42299af5$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,9c76e7cb52ebcfdd
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Sat, 05 Mar 2005 13:08:09 +0100
From: Hans Galema <notused@notused.nl>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: TCustomWinSocket Lock()!!!
References: <4228f8c1$1@newsgroups.borland.com> <42290e8b$1@newsgroups.borland.com> <42297c51$1@newsgroups.borland.com> <42298b47$1@newsgroups.borland.com> <42299308@newsgroups.borland.com> <42299621$1@newsgroups.borland.com> <42299af5$1@newsgroups.borland.com>
In-Reply-To: <42299af5$1@newsgroups.borland.com>
Content-Type: text/plain; charset=windows-1253; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 129.125.201.248
Message-ID: <4229a193@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1110024595 129.125.201.248 (5 Mar 2005 04:09:55 -0800)
Lines: 45
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!newshosting.com!nx02.iad01.newshosting.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail