🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ClientSocket SendBuf question

#4954
From: Mark Jacobs
Date: Sun, 21 Nov 2004 22:49
51 lines
2050 bytes
Sorry that should have been :-

SendBuf((void *)&naa1,sizeof(naa1));
-- 
Mark Jacobs

"Doug Neumann" <doug@tankoxious.com> wrote in message
news:41a11677$1@newsgroups.borland.com...
|
|
|
| I need help with sending a struct using the
|
| ClientSocket
|
| and the method
|
| int __fastcall SendBuf(void *Buf, int Count)
|
| I have many different defined in a seperate .h file. One example:
|
| struct nameandage {
|
| char name;
|
| int age;
|
| double weight;
|
| };
|
| In my program I start out with:
|
| TClientSocket *ClientSocket1;
|
| nameandage naa1;
|
| naa1.name = 'D';
|
| naa1.age = 39;
|
| naa1.weight = 219.78;
|
| How do I send naa1 using SendBuf method?
|
| Don't know how to put struct in a buffer.
|
| Not any good examples to look at.
|
| Thanks, Doug Neumann
|
Technical Details
Message-ID: <41a11b91$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed.freenet.de!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41a11677$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2b1d64dcbcd02aca
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Mark Jacobs" <http://www.jacobsm.com/mjmsg.htm?Borland%20Newsgroup>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <41a11677$1@newsgroups.borland.com>
Subject: Re: ClientSocket SendBuf question
Date: Sun, 21 Nov 2004 22:49:25 -0000
Lines: 52
Organization: DK Computing
MIME-Version: 1.0
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
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: 81.86.186.94
Message-ID: <41a11b91$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1101077393 81.86.186.94 (21 Nov 2004 14:49:53 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed.freenet.de!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail