Re: sending structure client server
- From: David Schwartz <davids@xxxxxxxxxxxxx>
- Date: Sat, 11 Oct 2008 23:58:01 -0700 (PDT)
On Oct 11, 9:19 am, swetha <laptop...@xxxxxxxxx> wrote:
Hi ,
I want to send a structure (user defined) for example :
struct bank{
int empid;
char name[50];
float amount;
} per;
I want to send this from a client to server on unix.Can any1 tell me
how to send this(from client) and read the data at the other end(at
server).tnx in advance...
1) Allocate a buffer the size of the data you're supposed to send.
2) Put the data from the structure into the buffer, following the
protocol specification to encode each field.
3) Call the 'send' or 'write' function.
4) On the other end, call 'recv' or 'read'. Read the data into a
character buffer.
5) Unpack the data into the structure following the protocol
specification.
DS
.
- References:
- sending structure client server
- From: swetha
- sending structure client server
- Prev by Date: Re: need help finding a "possible" deadlock in simple application...
- Next by Date: Somerset
- Previous by thread: sending structure client server
- Next by thread: SSPI and impersonation
- Index(es):
Relevant Pages
|