🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TServerSocket Not Receiving Data

#3173
From: Remy Lebeau (TeamB)
Date: Tue, 15 Nov 2005 00:25
47 lines
2821 bytes
"Hans Galema" <notused@notused.nl> wrote in message 
news:43790e73$1@newsgroups.borland.com...

> Do you use TClientSocket for the client part ?

That should not matter.  TServerSocket can accept, and communicate with, any 
client socket regardless of the environment it is coming from.  Everything 
ultmately operates on the same socket API anyway.  TCP, and thus socket 
behavior, is standardized across multiple platforms.

> Sorry. Servers do not connect to clients. A server can only
> listen and wait for connections.

In Bill's particular case, he is making his FTP client application open a 
separate listening server socket that the FTP server application will 
connect its own client socket to.  That is one scenerio in how the FTP 
protocol handles data connections.

> The OnRead event will never be triggered with stThreadBlocking.

That is correct only if Bill is not using the TServerSocket's OnGetThread 
event to provide his own cutom thread object for TServerSocket to use for 
each connection.  The default thread object that TServerSocket created by 
default does trigger the OnRead (and OnWrite) event.

> You have to actively read from a stream.

That is not always the case.

> Is DataSocket2 a TServerSocket ?

Given the example FTP commands that Bill showed, then his DataSocket would 
have to be a server socket, since that is what the PORT command requires.

> If yes why do you need 2 ?

He is only using 1 server socket.  He has to be sending his FTP commands 
over a client socket.

> We cannot check here the contents of Addr.

Presumably, Addr has been assigned to the IP that his TServerSocket is 
listening on.


Gambit 
Technical Details
Message-ID: <43792aca$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!atl-c02.usenetserver.com!news.usenetserver.com!atl-c07.usenetserver.com!news.usenetserver.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4378d734$1@newsgroups.borland.com> <43790e73$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,ed98f643ba2c61e4
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <4378d734$1@newsgroups.borland.com> <43790e73$1@newsgroups.borland.com>
Subject: Re: TServerSocket Not Receiving Data
Date: Mon, 14 Nov 2005 16:25:26 -0800
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 10.143.11.199
Message-ID: <43792aca$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1132014282 10.143.11.199 (14 Nov 2005 16:24:42 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!atl-c02.usenetserver.com!news.usenetserver.com!atl-c07.usenetserver.com!news.usenetserver.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail