You are on page 1of 12

PA.GENO.

18
DATE
EXP.NO ~

C· 011tvrrrA ,,.,,J ii,.,.,./,., S°ffVI! 1'

/,",, t),,,j 1,,n,d,·""' J~$S ,../


// f 11VtY
"

,?'1 j 1,,.,. I- '!4.Y 6


~ -0 O o · .. l5o ol

t,/11 / ()>' f 3 77$ 6


P.iac./vde /. J,}
i,nlvJ t ,< o.,. .. ,-,, t-h
fMid, tt.!A
11,t tf,,,,/

>o
YI ttJ
PAGENO:
DATE
EXP.NO. 6 a.

N~
s l~o ei/ '

Soc.kaddr_ /,, '

d
tlDJ e CUJnn j,

C'ft fu tf10 '

# inc..lud. e. ~a, , ·~e. · '1 >

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

C ,1 1ne- /I I, .. "' 11'0 .,...


n n ,:;..,J, 1
r-o 7%e 1er ve r'
r,,11r.
fJ , I rrf c..;./,u, 1~"
..> ,/A
l-,

- - - - - - - - - - - - - - - - - - --- 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.. >

1::/:'fndJie <Sl-d,o J,.),


-f:r_ i II c/u ,/e. .( c,, 1/. J,, }
~;,.,,f - : t
s oc...Kll I p<lt>..( er, ,,J,,/
7)1PSJ .~~ ~ ,b l!.. f e,. J pAj
~j
Ji;
I, i

• >
PAGE NO : Cl~
DATE
EXP.NO. b

Vo /d _gJ,.- cl,· CPILE- ~



c$ Ca,,/. ·
t!. Aa y ,. ~Y .:! malloc. a
uJh/k
J Jui J LSo<..k d
• ~
I LCt>n ~-

'11/- ma.,~ C.,';i I an c_ C./20,

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 ■ l!!l i I •■ ■'? ■ ■ 11 ■■ ~ ■■ o ■ '


■-'1 ■ ■ • ■■ ~- ■■ • •=• • •
•... ,•. -
1

=- ••


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 +

• ~
•• • '"•

You might also like