🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Indy10 usage

#483
From: Remy Lebeau (TeamB)
Date: Tue, 04 Mar 2008 17:41
29 lines
1935 bytes
"Mike Ruskai" <BUTthannydI@DONTearthlinkLIKE.netSPAM> wrote in message 
news:ghsqs35tipni65rjlntjpl7hgi6f1bv1g8@4ax.com...

> Indy supposedly supports SOCKS, so I'm trying to figure out
> how to convert the normal socket code to the bizarre usage of Indy.

Simply attach a TIdSocksInfo to your TIdTCPClient.  It will handle the SOCKS 
for you.  You don't have to change anything else in your reading/writing 
code.

> I'm assigning a TIdIOHandlerStack to the IOHandler property, and
> a TIdSocksInfo to the TransparentProxy property of the IOHandler

That is the way to go, yes.

> One problem is that there's no simple functional equivalent of recv()
> for the IOHandler.

Yes, there is, which you have already discovered - Readable() and 
ReadBytes().

> However, while Readable() returns true, both ReadBytes() and
> ReadLn() read nothing at all.

Please show your actual code.


Gambit 
Technical Details
Message-ID: <47cd89bb$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <ghsqs35tipni65rjlntjpl7hgi6f1bv1g8@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,ea086d952e8cb041
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <ghsqs35tipni65rjlntjpl7hgi6f1bv1g8@4ax.com>
Subject: Re: Indy10 usage
Date: Tue, 4 Mar 2008 09:41:29 -0800
Lines: 31
Organization: Lebeau Software
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: 207.178.157.90
Message-ID: <47cd89bb$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1204652475 207.178.157.90 (4 Mar 2008 09:41:15 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
X-Original-Bytes: 1778