sending structure in client server..

S

swetha

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...
 
V

vippstar

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...


Ask in an appropriate newsgroup. <comp.unix.programmer> might help
you.
Unix, networking et cetera are off-topic here in <comp.lang.c> where
only the C language is discussed.
 
A

Antoninus Twink

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...

Assuming the client and server are both running on the same machine,
there are a wide variety of options available to you, and without
further information about your setup, it's hard to recommend one in
particular. For example, you could use named pipes, shared memory or
sockets. If the client and server are running on different machines,
you'll need to rely on the last of those options...

To find out more, "interprocess communication" or "IPC" would be a good
term to Google. If you want more guidance here, you'll need to describe
your application in more detail.
 
K

Keith Thompson

Antoninus Twink said:
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...
[...]

To find out more, "interprocess communication" or "IPC" would be a good
term to Google. If you want more guidance here, you'll need to describe
your application in more detail.

If you want more guidance here, you'll be asking in the wrong place.
comp.unix.programmer is full of Unix experts, most of whom know more
about this stuff than most of the people here. "Antoninus Twink", for
whatever reason, apparently doesn't want you to know that.
 
N

Nick Keighley

Assuming the client and server are both running on the same machine,

isn't that a rather atypical Client Server application?
Yes, I know it happens but wouldn't it be more reasonable
to assume the Client and Server were on different machines.
Maybe utterly different hardware.

To the OP: try a Unix newsgroup and ask about sockets.

<snip>
 
A

Antoninus Twink

isn't that a rather atypical Client Server application?
Yes, I know it happens but wouldn't it be more reasonable
to assume the Client and Server were on different machines.

I'd hardly call it atypical. How many daemons are running on your
machine at the moment waiting for local connections? Are you running X
Windows at the moment with local client programs?

The OP didn't give us enough information to tell what his setup was: I
gave advice (which you snipped) that deals with both situations.
 
I

Ian Collins

Antoninus said:
I'd hardly call it atypical. How many daemons are running on your
machine at the moment waiting for local connections? Are you running X
Windows at the moment with local client programs?
Plenty and they also accept and correctly process remote ones. Fool.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top