Professional Documents
Culture Documents
18
DATE
EXP.NO ~
A·
>o
YI ttJ
PAGENO:
DATE
EXP.NO. 6 a.
N~
s l~o ei/ '
d
tlDJ e CUJnn j,
jr,J ~O U
PAGE NO : 2-0
DATE .
EXP.NO. £ C>..
I~ IVuLL,
'
-r/(1
CJU<e/ ~t:f_t Crea led ln 11 J '
.,,,,
i Ca llfJeC-I ( c"l'~t»Je,. .Jt1~k,I tJNue,I ~t;t-/<.addY ~ 't:,JJ.,.,.J'.J
- - - - - - - - - - - - - - - - - - --- AR UN S
BB .:::_ •• II ....
Terminal
@ I••• deepthl(!pdeepthl-Vlrtualeox: •/ .
l.r - J 1d e epthi.@d eepthi.-V i.rtua lBox : - S c:d 11
(40%) '4 >) 1 · 10:48AM
• • • deepthl(gldeepthl-VlrtualBox: ~/nplab
deepthi.@deepthi.-Vi.rtualBox : -/nplabS gc:c: pg6
¢"
~ plab ·c . c:
D 1deepthi.@deepthi.-Vi.rtualBox : -/nplab pg6c.c: In func:ti.on 'l'lai.n':
~ $ls pg6c.c:31:3: warni.ng: i.l'lpli.c:i.t declaration
·u ;a.out c:li.ent.c: ec:ho c:li.ent.c p -of f unc:ti.on ' i. net_pto n ' [ -Wi.l'lp l i.c: i. t - f unc: ti.o
-~ ,1g6c pg6s server n-declarati.on]
~ 1cli.ent d.txt echo server.c p i.net_pton(AF_INET,argv[1],&address.si.n_a
l::aiil g6c:.c: pg6s.c: server.c:
· -· •deepthi.@deepthi.-Vi.rtualBox : - deepth .deepthl@deepthl-VlrtualBox : -/nplabS ./a.out
•'f li.@deepthi.-Vi.rtualBox : -bS gc:c: pg6s. 12.7.0.0.1
- ·'S ./a.out
e:l ideepthi.@deepthi.-Vi.rtualBox : -/nplab
The Socket was created
·The connecti.on was accepted wi.th the server
12.7.0.0.1 ...
.-:i' The socket was created hi
1.11 The address before bind 0.e.0.0 hi
hello 0 0 «D deepth l~deepthl-Vlrt ual
hello deepthl@deepthl-VlrtualBox : -/
□ nplabS gee pg6c.c
pg6c.c: In fun ction •~aln':
server i.s li.steni.ng pg6c . c:31:3 : warnlng: i.~pli.ci.
The server's local address 0.0.1:1.0 t declaration of functi.on 'ln
... and port 1S001 et_pto n ' [ -Wi.~p l i.ci. t- function
The Cli.ent 127.0.0.1 i.s Connected - declar a ti.on J
... on port 37786 i.net_pton(AF_INET,argv[1],
i.nsi.de chi.ld
The Cli.ent 127.0.0.1 i.s Connected deepthl@deepthl-VlrtualBox : ~/
... on port 37788 nplabS ./a.out 12.7.0.0.1
i.nsi.de chi.ld The Socket was created
□ The connection was accepted w
i.th the server 12.7.0.0.1 ...
hi
,{ t.lnisfd . J.. >
• >
PAGE NO : Cl~
DATE
EXP.NO. b
t'
--------AR UNs-~
-------------
Terminal BB - •• II .... (43%) '4>) 1 10:5 1 AM ¢,
' '
(!) =•-~~ deipthl(!pd e-e-pthl-VlrtUaleox:'111 .deepthl(gldeepthl-VlrtualBox: - /nplab
l.r- J ,deepthi.@deepthi.-Vi.rtualBox : -/nplab deepthi.@deepthi.-Vi.rtualBox : -/nplabS gc:c: ec:h
~ S gc:c: ec:ho_server .c: o cli.ent.c:
D 1deepthi.@deepthi.-Vi.rtualBox : ~/nplab deepthi.@deepthi.-Vi.rtualBox : ~/nplab $ ./a.out
f i $ ./a.out 12.7.El.0.1
'U The soc:ket was created The Soc:ket was created
._ Bi.ndtng Socket Enter l'lessage to be sent and echoed
~ • server i.s li.steni.ng hi
l::aiil The Cli.ent 12.7.0.0.1 i.s Connec:ted. hi
Enter l'lessage to be sent and ec:hoed
~ · Ii hi
hi
Enter l'lessage to be sent and ec:hoed
□ l·.Oe 49 • deepthl(gldeepthi-VJrt ual
deepthi.@deepthi. - Vi.rtualBox : -/
nplab $ gee: echo_ cltent.c
deepthi.@deepthi. - Vi.rtualBox : ~/
nplab $ ./a.out 12.7.0.El.1
The Soc:ket was c:reated
Enter l'lessage to be sent and
ec:hoed
hi
I
PA GE NO . ~$
DATE
EXP.NO. : C-
<
-J,J ln 1
t
oT )),
Prl/1 Al Ul N' .S
PAGE NO: R _j
DATE
EXP.NO. : b~
t l,Y-V • L
'Yr::
/, J /'
~ens C oc ·
J (JtJo
cho C DcJ:.
~of
J.. inf
PAGE NO
DATE
EXP.NO .
,•
'/4n >o
v/..s
e:xJ/-CoJ •
h-V add- o
t!:Jl-/f{o
-~
- - -- - - -- -- - - -- - - - - -- --A RU N~
Terminal §l§ - •• II • (81%) ol>J r
•
:2 9AM ¢-
•@ f0 0$ deepthl~deepthl-Vlrtua lBr 0 0 0 deepthl(gldeepthl-VlrtualBox: -/nplab
l.r- J File Edit View Search Terminal Help File Edit View Search Termin,11 Help
ii! 1deepthi.@deepthi.-Vi.rtualBox ; - S
c:d nplab
deepthi.@deepthi. -Vi.rtualBox : -/nplabS ./
a.out 127.0.0.1
f i lde epthi.@deepthi.-V i.rtua lBox : - / n The Socket was c r eated
'U plabS ls _ente r l'lessagehi.
•· ., 6c:.c: a.out c:ltent.c: ec:ho The add r ess 127.0.0.1
- c:li.ent.c: pg6c pg6s serv
· "'
•· 6c:s.c: cli.ent d.txt ec:ho
•'f serve r .c: pg6c.c: pg6s.c: se r v
, e r .c:
e:l 1deepthi.@deepthi. - Vi.rtualBox : -/n
.-:i' 1deepthi.@deepthi.-Vi.rtua1Box : ~/n
ltll IIll
[flfl1'1$ gee "C
· deepthi.@deepthi.-Vi.rtualBox : -/n
l'l!l'i'l plabS gc:c: 6c:s.c:
bJl ' deepthi.@deepthi.-Vi.rtualBox : -/n
- lplabS ./a.out
fJ The socket was created
- • The address bef ore bi.nd 0.0.0.
""'
: "- , 'Bi. nc!i.ng Soc:ket
- I
f;
=- ••
•
■
I
.■•• ■■ • ■■ a ■■ La ■ o I ■ " ■ !!1" 1 ■■ 1 ■
■-;,■ ■ , ■■ ·( • ■■ • WI b I I "ii I m ■
0
._,.
s l ■ w !!II • ■■ • - ■ i- ■ •-1!! " ■■ , •■ ■■ , ■■ 1 ■■-1.•
' a'T■ "
0 +
• ~
•• • '"•