<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EmbLogic &#187; server</title>
	<atom:link href="https://www.emblogic.com/blog/tag/server/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Client Server communication in IPC using FIFO for 3 clients</title>
		<link>https://www.emblogic.com/blog/01/client-server-communication-in-ipc-using-fifo-for-3-clients/</link>
		<comments>https://www.emblogic.com/blog/01/client-server-communication-in-ipc-using-fifo-for-3-clients/#comments</comments>
		<pubDate>Wed, 06 Jan 2016 05:35:31 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[client-server]]></category>
		<category><![CDATA[embedded c]]></category>
		<category><![CDATA[Embedded Linux]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[FIFO]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pipes]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13118</guid>
		<description><![CDATA[Logfile of Project &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: It includes basic headerfiles for FIFOs. It contains &#8230; <a href="https://www.emblogic.com/blog/01/client-server-communication-in-ipc-using-fifo-for-3-clients/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Logfile of Project</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It includes basic headerfiles for FIFOs.<br />
It contains stdio.h, fcntl.h, unistd.h, sys/types.h, sys/stat.h<br />
It contains #ifndef HEADERS to avoid multiple declaration of heders by differnt files.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/21 04:54:01;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: request.h,v<br />
Working file: request.h<br />
head: 1.7<br />
branch:<br />
locks: strict<br />
root: 1.7<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 7;    selected revisions: 7<br />
description:<br />
It contains struct request<br />
It is format of basic client request.<br />
It contains client PID, 2 objects,operation to be performed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7    locked by: root;<br />
date: 2015/12/21 05:56:59;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/12/21 05:52:10;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/21 05:50:03;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/12/21 05:46:10;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/21 05:32:51;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 05:27:31;  author: root;  state: Exp;  lines: +1 -1<br />
Macro of REQUESTFIFO is redefined which contains a %d which will be its PID.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 04:56:38;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: adder.c,v<br />
Working file: adder.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
adder has command line arguments which contains File Descriptors of pipe.<br />
adder read request from server for adding 2 objects<br />
adder write result(int) into server.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/21 04:40:12;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client1.c,v<br />
Working file: client1.c<br />
head: 1.14<br />
branch:<br />
locks: strict<br />
root: 1.14<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 14;    selected revisions: 14<br />
description:<br />
It open the requestfifo<br />
Write request for addition using struct request to server<br />
Then, it reads result(int) from server.<br />
Before reading result &#8220;resultfifo&#8221; is being created by client.<br />
Different clients uses same requestfifo but they have unique resultfifo which is created by client itself.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14    locked by: root;<br />
date: 2015/12/21 06:16:33;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2015/12/21 06:11:20;  author: root;  state: Exp;  lines: +7 -7<br />
name of arr changes to client_fifo<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/12/21 05:59:17;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2015/12/21 05:56:32;  author: root;  state: Exp;  lines: +3 -3<br />
arr data type changes from char * to string.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/12/21 05:52:06;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/12/21 05:50:02;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/12/21 05:46:08;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/12/21 05:41:58;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/12/21 05:39:43;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/21 05:35:20;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/12/21 05:34:03;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/21 05:32:47;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 05:27:08;  author: root;  state: Exp;  lines: +3 -1<br />
sprintf() is used for creating client address.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 04:42:31;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client2.c,v<br />
Working file: client2.c<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
client2 request for subtraction from the server.<br />
It writes its request from requestfifo.<br />
And it creates the resultfifo.<br />
And it reads result from server through resultfifo.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2015/12/21 06:36:30;  author: root;  state: Exp;  lines: +7 -4<br />
client_fifo is introduced.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 05:09:19;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client3.c,v<br />
Working file: client3.c<br />
head: 1.3<br />
branch:<br />
locks: strict<br />
root: 1.3<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 3;    selected revisions: 3<br />
description:<br />
This client request for multiplication.<br />
It writes request to server through requestfifo.<br />
It creates resultfifo.<br />
It reads result from server through resultfifo.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3    locked by: root;<br />
date: 2015/12/21 06:37:03;  author: root;  state: Exp;  lines: +7 -4<br />
client_fifo is introduced.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 05:16:34;  author: root;  state: Exp;  lines: +1 -1<br />
Values of objects changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 05:14:09;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: multiplier.c,v<br />
Working file: multiplier.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It read request from server from pipe for multiplication purpose.<br />
It prosses the request and get the result.<br />
result is written to server through pipe.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/21 04:46:24;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: server.c,v<br />
Working file: server.c<br />
head: 1.6<br />
branch:<br />
locks: strict<br />
root: 1.6<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 6;    selected revisions: 6<br />
description:<br />
Ii can handle only 1 client in this revision.<br />
requestfifo is created.<br />
It reads the request from client.<br />
A pipe is created by server.<br />
This pipe is used to send request to adder.<br />
Then, it read result(int) from adder.<br />
through pipe.<br />
It writes result to the client using resultfifo (of respectice client).<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6    locked by: root;<br />
date: 2015/12/21 06:18:23;  author: root;  state: Exp;  lines: +1 -1<br />
client_fifo data type changes from char to string.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/21 06:16:43;  author: root;  state: Exp;  lines: +1 -1<br />
sprintf() is used for getting RESULTFIFO name.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/12/21 06:11:34;  author: root;  state: Exp;  lines: +3 -1<br />
client_fifo is used for RESULT_FIFO.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/21 05:06:34;  author: root;  state: Exp;  lines: +3 -3<br />
+,-,* are replaced by &#8216;+&#8217;,&#8217;-&#8217;,&#8217;*&#8217; respectively in switch case of operation.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 05:04:10;  author: root;  state: Exp;  lines: +13 -3<br />
execl() for subtractor and multiplier are also included along with addition in a switch case which depend on operand of the request by the client.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 04:47:51;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: subtractor.c,v<br />
Working file: subtractor.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It reads request from server through pipe for subtraction purpose.<br />
It processes the request and get the result.<br />
result is send to server by the pipe.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/21 04:52:26;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/client-server-communication-in-ipc-using-fifo-for-3-clients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
