Unix Programming - FIFO/Named Pipes

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > April 2004 > FIFO/Named Pipes





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author FIFO/Named Pipes
Grant Austin

2004-04-26, 10:34 am

Is it possible to send a struct through a named pipe?

It would be handy for what I'm working on but not horribly
necessary.

-Grant
Måns Rullgård

2004-04-26, 10:34 am

Grant Austin <gaustin@foo.foo.bar.net> writes:

> Is it possible to send a struct through a named pipe?


Yes. Since a pipe is always local many of the possible errors (byte
order, padding) will vanish. Sending structs over network sockets, or
storing them in files requires a bit more care.

--
Måns Rullgård
mru@kth.se
joe durusau

2004-04-26, 1:34 pm



Grant Austin wrote:

> Is it possible to send a struct through a named pipe?
>
> It would be handy for what I'm working on but not horribly
> necessary.
>
> -Grant


You can send the data in it, but it might be dangerous. I would expect
it would work, provided that nobody had used compiler options that
changed the way the data was packed in one module or the other.

Speaking only for myself,

Joe Durusau


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com