🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

TServerSocket -> WebPage

#5550
From: Jo�o Pereira
Date: Wed, 04 Aug 2004 12:15
17 lines
1380 bytes
How can i automatic send a image to a web page. Per example inserting my
remote IP in the address bar of IE and automaticly loads a image that is on
the other side.

I've tryed this code:

void __fastcall TForm1::MyServerClientRead(TObject *Sender,
      TCustomWinSocket *Socket)
{
        TMemoryStream *MyStream = new TMemoryStream();
        MyStream->LoadFromFile("c:\\imagem.jpg");
        Socket->SendStream(MyStream);

}

but in IE the image just loads about 90% and i gotta press stop to see the
image. Seems like i got to send the stream size, but how can i do that?
Technical Details
Message-ID: <4110d343$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,17d6b73752afed17,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jo�o Pereira" <joao@pupula.com>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: TServerSocket -> WebPage 
Date: Wed, 4 Aug 2004 13:15:01 +0100
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 213.146.208.150
Message-ID: <4110d343$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1091621699 213.146.208.150 (4 Aug 2004 05:14:59 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail