EmbLogic's Blog

Client Server Communication using FIFO for single server and a client when result FIFO created by client

Logfile of Project

————————————

————————————
RCS file: header.h,v
Working file: header.h
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 2
description:
It contains basic header files for communication using FIFO.
—————————-
revision 1.2    locked by: root;
date: 2015/12/20 23:20:47;  author: root;  state: Exp;  lines: +2 -2
It is prevented from multiple declarations.
—————————-
revision 1.1
date: 2015/12/20 23:18:12;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: request.h,v
Working file: request.h
head: 1.5
branch:
locks: strict
root: 1.5
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;    selected revisions: 5
description:
This is format of client request.
it contains client pid, operator and 2 objects(int).
—————————-
revision 1.5    locked by: root;
date: 2015/12/21 04:27:36;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.4
date: 2015/12/21 04:26:40;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.3
date: 2015/12/21 03:53:15;  author: root;  state: Exp;  lines: +3 -0
macro REQUESTFIFO and RESULTFIFO are defined.
—————————-
revision 1.2
date: 2015/12/21 01:32:02;  author: root;  state: Exp;  lines: +1 -1
name of cpid changes to pid.
—————————-
revision 1.1
date: 2015/12/20 23:18:41;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: adder.c,v
Working file: adder.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
It is a function for adding.
It reads request from server as struct request and write result to server in int format through pipe.
—————————-
revision 1.1    locked by: root;
date: 2015/12/21 02:02:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: client1.c,v
Working file: client1.c
head: 1.22
branch:
locks: strict
root: 1.22
access list:
symbolic names:
keyword substitution: kv
total revisions: 22;    selected revisions: 22
description:
client open the requestfifo.
client writes some text into i.
—————————-
revision 1.22    locked by: root;
date: 2015/12/21 04:29:45;  author: root;  state: Exp;  lines: +4 -4
*** empty log message ***
—————————-
revision 1.21
date: 2015/12/21 04:09:45;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.20
date: 2015/12/21 04:08:24;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.19
date: 2015/12/21 04:07:12;  author: root;  state: Exp;  lines: +2 -2
ce
—————————-
revision 1.18
date: 2015/12/21 03:57:01;  author: root;  state: Exp;  lines: +4 -4
*** empty log message ***
—————————-
revision 1.17
date: 2015/12/21 03:52:08;  author: root;  state: Exp;  lines: +6 -6
requestfifo is replaced by REQUESTFIFO
resultfifo is replaced by RESULTFIFO
—————————-
revision 1.16
date: 2015/12/21 03:17:55;  author: root;  state: Exp;  lines: +10 -1
Now, client creates resultfifo.
resultfifo is open in mode 666.
—————————-
revision 1.15
date: 2015/12/21 02:52:59;  author: root;  state: Exp;  lines: +1 -1
sleep time increse from 4 to 8.
—————————-
revision 1.14
date: 2015/12/21 02:49:55;  author: root;  state: Exp;  lines: +2 -2
name of requestfifo corrected to resultfifo.
—————————-
revision 1.13
date: 2015/12/21 02:42:57;  author: root;  state: Exp;  lines: +1 -1
sleep time reduced to 4 from 10.
—————————-
revision 1.12
date: 2015/12/21 02:34:15;  author: root;  state: Exp;  lines: +2 -1
sleep(10) added.
—————————-
revision 1.11
date: 2015/12/21 02:24:59;  author: root;  state: Exp;  lines: +31 -6
Client reads result from server.
—————————-
revision 1.10
date: 2015/12/21 01:33:51;  author: root;  state: Exp;  lines: +1 -1
buff is removed.
—————————-
revision 1.9
date: 2015/12/21 01:31:01;  author: root;  state: Exp;  lines: +13 -4
Server reading request.
—————————-
revision 1.8
date: 2015/12/21 01:12:53;  author: root;  state: Exp;  lines: +2 -1
*** empty log message ***
—————————-
revision 1.7
date: 2015/12/21 00:03:08;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
—————————-
revision 1.6
date: 2015/12/21 00:00:49;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.5
date: 2015/12/20 23:59:50;  author: root;  state: Exp;  lines: +2 -1
*** empty log message ***
—————————-
revision 1.4
date: 2015/12/20 23:56:41;  author: root;  state: Exp;  lines: +2 -3
A character is written to FIF
O.
—————————-
revision 1.3
date: 2015/12/20 23:45:04;  author: root;  state: Exp;  lines: +2 -0
*** empty log message ***
—————————-
revision 1.2
date: 2015/12/20 23:39:19;  author: root;  state: Exp;  lines: +2 -2
some print statements added.
—————————-
revision 1.1
date: 2015/12/20 23:11:52;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: server.c,v
Working file: server.c
head: 1.37
branch:
locks: strict
root: 1.37
access list:
symbolic names:
keyword substitution: kv
total revisions: 37;    selected revisions: 37
description:
Server creates requestfifo using mkfifo() function.
—————————-
revision 1.37    locked by: root;
date: 2015/12/21 04:29:53;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.36
date: 2015/12/21 04:24:47;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.35
date: 2015/12/21 04:09:47;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.34
date: 2015/12/21 04:08:25;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.33
date: 2015/12/21 04:07:16;  author: root;  state: Exp;  lines: +2 -2
ce
—————————-
revision 1.32
date: 2015/12/21 03:57:02;  author: root;  state: Exp;  lines: +6 -6
*** empty log message ***
—————————-
revision 1.31
date: 2015/12/21 03:52:55;  author: root;  state: Exp;  lines: +11 -11
requestfifo is replaced by REQUESTFIFO
>> resultfifo is replaced by RESULTFIFO
>> .
—————————-
revision 1.30
date: 2015/12/21 03:18:28;  author: root;  state: Exp;  lines: +4 -0
server write result into resultfifo.
server do not create resultfifo from now.
—————————-
revision 1.29
date: 2015/12/21 02:55:05;  author: root;  state: Exp;  lines: +1 -1
printing changes.
—————————-
revision 1.28
date: 2015/12/21 02:41:37;  author: root;  state: Exp;  lines: +3 -0
adding print statements.
—————————-
revision 1.27
date: 2015/12/21 02:37:45;  author: root;  state: Exp;  lines: +1 -1
ce
—————————-
revision 1.26
date: 2015/12/21 02:34:32;  author: root;  state: Exp;  lines: +1 -1
sleep(1) added.
—————————-
revision 1.25
date: 2015/12/21 02:28:43;  author: root;  state: Exp;  lines: +1 -1
Problem in passing argument to write.
It is an address.
—————————-
revision 1.24
date: 2015/12/21 02:28:08;  author: root;  state: Exp;  lines: +2 -2
ce
—————————-
revision 1.23
date: 2015/12/21 02:27:11;  author: root;  state: Exp;  lines: +1 -1
ce
—————————-
revision 1.22
date: 2015/12/21 02:25:30;  author: root;  state: Exp;  lines: +4 -3
Server writes result to client.
—————————-
revision 1.21
date: 2015/12/21 02:12:44;  author: root;  state: Exp;  lines: +1 -1
sleep(1) is added between writing request and reading result from adder.
—————————-
revision 1.20
date: 2015/12/21 02:11:10;  author: root;  state: Exp;  lines: +1 -1
data type of char rfd,wfd changes to char rfd[4],wfd[4]
—————————-
revision 1.19
date: 2015/12/21 02:09:06;  author: root;  state: Exp;  lines: +1 -1
rfd and wfd of pipe which are to be send to adder using execl .
Ther data type corrected from int to char.
—————————-
revision 1.18
date: 2015/12/21 02:07:13;  author: root;  state: Exp;  lines: +1 -1
data type of arr is corrected.
arr is array of pipe.
It changes from char to int.
—————————-
revision 1.17
date: 2015/12/21 02:03:54;  author: root;  state: Exp;  lines: +62 -11
Server writes request to adder() for calculation.
It creates a pipe using pipe() and execl()
It reads result from adder() after calculation.
—————————-
revision 1.16
date: 2015/12/21 01:31:12;  author: root;  state: Exp;  lines: +5 -3
Server reading request and client writing request.
—————————-
revision 1.15
date: 2015/12/21 01:14:24;  author: root;  state: Exp;  lines: +1 -1
wrfifo open in read mode.
—————————-
revision 1.14
date: 2015/12/21 01:12:55;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
—————————-
revision 1.13
date: 2015/12/21 01:07:00;  author: root;  state: Exp;  lines: +2 -2
open() command given to requestfifo()
—————————-
revision 1.12
date: 2015/12/21 01:01:40;  author: root;  state: Exp;  lines: +1 -1
sleep changes from 2 to 10.
—————————-
revision 1.11
date: 2015/12/21 00:04:48;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.10
date: 2015/12/21 00:03:10;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.9
date: 2015/12/20 23:57:01;  author: root;  state: Exp;  lines: +3 -3
A character is read from fifo.
—————————-
revision 1.8
date: 2015/12/20 23:53:41;  author: root;  state: Exp;  lines: +1 -1
mode changes from 666 to 777.
—————————-
revision 1.7
date: 2015/12/20 23:46:29;  author: root;  state: Exp;  lines: +1 -1
mode of requestfifo is corrected.
—————————-
revision 1.6
date: 2015/12/20 23:41:16;  author: root;  state: Exp;  lines: +1 -0
sleep(2) is given before read.
—————————-
revision 1.5
date: 2015/12/20 23:31:17;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.4
date: 2015/12/20 23:26:07;  author: root;  state: Exp;  lines: +2 -2
Spelling mistake corrected
acces changes to access()
—————————-
revision 1.3
date: 2015/12/20 23:23:11;  author: root;  state: Exp;  lines: +1 -1
; mistake.
—————————-
revision 1.2
date: 2015/12/20 23:22:31;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.1
date: 2015/12/20 23:12:38;  author: root;  state: Exp;
Initial revision
=============================================================================

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>