EmbLogic's Blog

IPC based server-client project using message queue with semaphore

OUTPUT AT SERVER TERMINAL
[root@VIPIN scp_mq_using_semp]# ./server
semget:: Success
msgget:: Success
msgctl:: Success
msgrcv at server: Success
1
2
+
data send to pc1 from server: Success
msgget:: Success
data recieved from server at pc1: Success
result send to server from pc1: Success
msgrcv at server: Success
5
1
-
msgget:: Success
data recieved from server at pc2: Success
result send to server from pc2: Success
msgrcv at server: Success
5
9
*
msgget:: Success
data recieved from server at pc3: Success
result send to server from pc3: Success
msgrcv at server: Success
1
2
+
data send to pc1 from server: Success
msgget:: Success
data recieved from server at pc1: Success
result send to server from pc1: Success
msgrcv at server: Success
5
9
*
msgget:: Success
data recieved from server at pc3: Success
result send to server from pc3: Success
msgrcv at server: Success
5
1
-
msgget:: Success
data recieved from server at pc2: Success
result send to server from pc2: Success

OUTPUT AT REQUESTING CLIENT TERMINAL
[root@VIPIN scp_mq_using_semp]# ./t
msgget:: Success
msgctl:: Success
semget:: Success
msgsnd to server from rc1: Success
msgget:: Success
msgctl:: Success
semget:: Success
msgget:: Success
msgctl:: Success
semget:: Success
result recieved by rc1: Success
result at rc1 1 + 2=3
msgsnd to server from rc2: Success
result recieved by rc2: Success
result at rc2 5 – 1=4
msgsnd to server from rc3: Success
result recieved by rc3: Success
result at rc3 5 * 9=45
[root@VIPIN scp_mq_using_semp]#

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>