🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Data through Socket Connection

#827
From: Remy Lebeau (TeamB)
Date: Tue, 25 Sep 2007 16:36
26 lines
1907 bytes
"Aitor Matilla" <matilla@sensofar.com> wrote in message
news:46f8bc4e$2@newsgroups.borland.com...

> I'm trying to connect two applications in different computers
> through a client-server socket connection. I'm interesting to
> send a big amount of data and I don't know how to do it.

I suggest you read up on socket programming in general.  There are plenty of
books and tutorials available.  And go to http://www.deja.com to search the
newsgroup archives for code examples.

> First of all, I thought to use SendBuf / ReceiveBuf (i.e : SendBuf
> (Buf, sizeof(myclass))).

That is exactly what you do.  There is more to it than just that, though -
error handling, handling of partial data blocks, blocking vs. non-blocking,
etc.

> However, it shouldn't work because of I cannot send memory addresses?

You don't send the addresses themselves.  That is not how sockets work.  The
data being pointed to is what gets sents instead.


Gambit
Technical Details
Message-ID: <46f93930$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.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: <46f8bc4e$2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,c4e53e5901851367
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: <46f8bc4e$2@newsgroups.borland.com>
Subject: Re: Data through Socket  Connection
Date: Tue, 25 Sep 2007 09:36:23 -0700
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.83.29.61
Message-ID: <46f93930$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1190738224 75.83.29.61 (25 Sep 2007 09:37:04 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.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