Uploaded by lalibab309

DC

advertisement
Experiment NO-2
AimTd demanstraue_0atag yam sOCKe_prograMminq
te
r
chat applicatianTAeorY Socke pragvamni ngi=S0CkEE programminq le q way of _connecting
tujd nodee a
a
withedch othey
netiOrK to commyNicate
OneSoCKeL Cnode)tiçtens an a paticdla
POTtdt an IP uiLe tte oteL £ocket eachec
out to the othe to
oma caMnecELon-The Sexve forme t e Listeneysacket
uhile HaeclieMt_reachee o t to_the
Se rVe
T0 cveate applictlon_ tha ucecvOP
O ectd-+
blislhd cannectian betJeCncluen 2,
server
SO collo wing stf09 cre neede d
create
a Gerver_Proguam_
Create
G
a
clien Lrogram
ex ecutecieut
Cer verProgram
i1create
a
TOcredte
serve erog ramnia server prdgrdm allouinq-
Steps dre Yequired
UOP _soCket
1 1 Ckeate a
iiyeind the socKet to tthe servec
address
i
wait unttll_ The_cdatagvam
packetaiec
rGm t h e client
FOR EDUCATIONAL USE
V
Procesc the datagkam_packe 8
B0 t e client
Vyco baCK 0Step iu
send areply-
iCreate_a client _Progkam
_create
au upP_cacReL _
iiyseud a
message to the Gervere
iwait_untiirecponce_ponm
ecieved
process
epls A ga loqckto Step 2 iEneces
cary
vp_Ctoe 6ocket descripto
exit-
i
executing-client cere
Tocredte
tae cldsCog
o
theserver is
Tun bot
program:-
recpec+ivels_ve need
the_progam i seperate eomm-
a n d prompt windou
y
we slhduld execute cerVer
clas loe£ore clienk
class
ConctuGion Thuswe cuccecs
FUIUimplemento d
tthe Datagram cockeE_Pra9amming
For the chat
applicatlom-
Download