12-09-2007
33,
0
Join Date: Nov 2007
Last Activity: 23 September 2009, 12:43 PM EDT
Posts: 33
Thanks Given: 0
Thanked 0 Times in 0 Posts
script to develope
Hi
All,
can you please help me to develope this script?
Any help will be appreciated.
Sender Broadcasting Same Message to Multiple Processes
Write two programs, a sender and a receiver. The sender will take text entered
at the keyboard, and broadcast it as a message to multiple copies of the
receiver program. Upon receipt of a message, a receiver outputs its program
name(argv[0]) and the message content. The sender loops sending entered text as
message until end of file is encountered at the keyboard. Upon EOF the sender,
transmits a delimiter message to all receivers. As each receiver finishes with
the message queue, it transmits a message back to sender. After receiving such
an acknowledge message from every receiver, the sender removes the message
queue.
eg.
assume the sender's filename is---msg_wall_s
receiver's filename is ---msg_wall_r
$msg_wall_s
Enter message to be sent to all receivers: abcde
msg_wall_r0 received 'abcde'
msg_wall_r1 received 'abcde'
msg_wall_r2 received 'abcde'
Enter message to be sent to all receivers: xyz
msg_wall_r0 received 'xyz'
msg_wall_r1 received 'xyz'
msg_wall_r2 received 'xyz'
Enter message to be sent to all receivers: <CONTROL/D>
msg_wall_r0 received 'EOF'
msg_wall_r1 received 'EOF'
msg_wall_r2 received 'EOF'
$
Thanks,
Vish