🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

ClientSocket SendBuf question

#4953
From: Doug Neumann
Date: Sun, 21 Nov 2004 21:28
42 lines
1467 bytes


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: <41a11677$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news2.euro.net!216.196.110.149.MISMATCH!border2.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

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2b1d64dcbcd02aca,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Doug Neumann" <doug@tankoxious.com>
Sender: "Doug Neumann" <doug@tankoxious.com>
Reply-To: "Doug Neumann" <doug@tankoxious.com>
Subject: ClientSocket SendBuf question
Newsgroups: borland.public.cppbuilder.internet.socket
X-User-Info: 65.114.135.202     
NNTP-Posting-Host: 207.105.83.66
Message-ID: <41a11677$1@newsgroups.borland.com>
Date: 21 Nov 2004 14:28:07 -0700
X-Trace: newsgroups.borland.com 1101076087 207.105.83.66 (21 Nov 2004 14:28:07 -0700)
Lines: 43
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news2.euro.net!216.196.110.149.MISMATCH!border2.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