🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Send buffer from server to a client

#4489
From: Hans Galema
Date: Thu, 27 Jan 2005 19:36
54 lines
2950 bytes
Remy Lebeau (TeamB) wrote:

>>So your client is non-blocking.
> 
> That has nothing to do with it. 

Of course that was a logical conclusion. Vinicius was speaking of events.
There are only onread events in non-blocking mode.

 > The TClientSocket could be usd in blocking
> mode and still use its OnRead event.

A TClientSocket does not produce OnRead events when in blocking mode.
So how would that go ? Please show.

But actually we were talking about an IdTCPClient1.

>>If it was blocking then your client could do a ReadBufer() rigth
>>after the WriteBuffer(). At least if the server will send always after
>>it received a message from the client.
> 
> That has nothing to do with blocking vs. non-blocking.  

It has all to do with it. If it is a blocking client it will
will try to read as soon as it expects data from the server. Here just after
sending a command. When it was non-blocking it would do nothing after sendig
a command. Then if an OnRead event was triggered it would read.

 > And there is nothing
> preventing the server from sending unsolicited data that the client would
> read asynchronously from any writing. 

Well I do not know what Vinicius server is up to so that's why I asked.
Apparently you know already. Strange.

 > It all depends on the communication
> protocol that Vinicius is trying to implement for the actual data,

Indeed the actual implementation depends on the protocol. But also on the
blockingmode.

> not the
> reading/writing mode used.  

????

> The same data is read/written in either mode.

That is what we all will hope. But that was not discussed.

I'm still really amazed about this reply of you. I can hardly believe that
it did came from you. So stange.

Hans.
Technical Details
Message-ID: <41f942e7$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news1.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41f90c54@newsgroups.borland.com> <41f91223$1@newsgroups.borland.com> <41f91ff2@newsgroups.borland.com> <41f92451$1@newsgroups.borland.com> <41f93b7a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2b30b06ce9be7f64
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 27 Jan 2005 20:36:04 +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: Send buffer from server to a client
References: <41f90c54@newsgroups.borland.com> <41f91223$1@newsgroups.borland.com> <41f91ff2@newsgroups.borland.com> <41f92451$1@newsgroups.borland.com> <41f93b7a$1@newsgroups.borland.com>
In-Reply-To: <41f93b7a$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 129.125.201.248
Message-ID: <41f942e7$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1106854631 129.125.201.248 (27 Jan 2005 11:37:11 -0800)
Lines: 55
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news1.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail