Thread: pipes

  1. #1


    Hi, I have the folowing data structures

    struct account_record
    unsigned int account_number;
    unsigned int pin;
    long int balance;

    struct message
    char transaction_code;
    struct account_record mesage account;

    What I would like to do is pass a message between two programs using a UNIX pipe.

    I've been able to get a pipe working to send and recieve string of char but have'net got a clue when it comes to a data structure!

    Anybody got any idea's

    Thanks for your time.


  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Pass it the same way you read or write any data. If you're using fread or fwrite, just write the size of the item and read that amount from the other end.

    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pipes sometimes fail
    By EVOEx in forum Linux Programming
    Replies: 2
    Last Post: 05-02-2009, 01:47 PM
  2. Pipes
    By Martin Kovac in forum C Programming
    Replies: 1
    Last Post: 03-31-2009, 03:09 AM
  3. pipes in c
    By ajal1 in forum C Programming
    Replies: 6
    Last Post: 10-29-2005, 03:29 PM
  4. Need some help with pipes please.
    By carrja99 in forum C Programming
    Replies: 1
    Last Post: 05-05-2004, 04:13 PM
  5. Services and Pipes
    By nickname_changed in forum Windows Programming
    Replies: 0
    Last Post: 07-16-2003, 06:46 AM