Ishni bajarish tartibi:
Ishni Eclipse yoki NetBeans IDE ishlab chiqarish muhitini yuklash bilan boshlaymiz. Buning uchun ish stolida turgan Eclipse yoki NetBeans IDE muhiti yorlig’ini sichqonchaning chap tomonini ikki marta bosib yuklaymiz. Bizning holatda NetBeans IDE muhiti ishga tushadi.
Quyidagi rasmda NetBeans IDE muhitining asosiy darchasi yuklangan.
Rasm 2.1. Net Beans IDE muhiti asosiy darchasi
Shundan so’ng «Fayl» menyusidan «Otkrыt proekt» bo’limi tanlanganda paydo bo’lgan darchadan «Talabaning_Ismi» proyektini tanlab “Otkrыtie proekta” tugmasi bosiladi.
So’ng ochilgan loyihaning «tcp» paketi ustiga sichqonchaning o’ng tumasi bir marta bosiladi, paydo bo’lgan kontekst menyudan «Novыy → Klass Java» tanlanadi.
Rasm 2.2. NetBeans IDE muhiti Yangi klass yaratish
“New Klass Java” darchasining «Imya klassa» maydoniga “Server” kiritilib
«Gotovo» tugmasi bosiladi.
Rasm 2.3. NetBeans IDE muhiti «New Klass Java» darchasi Yaratilgan Server.java fayli ichiga TCP server Java kodi kiritiladi.
Rasm 2.4. NetBeans IDE muhiti Server.java fayli
Nazorat savollari
TCP protokoli.
IP tushunchasi.
Port tushunchasi.
Soket tushunchasi.
Eclipse IDE muhiti.
NetBeans IDE muhiti.
java.net.* paketi.
java.io.* paketi 9. ServerSocket klassi.
InputStream klassi.
OutputStream klassi.
Adabiyotlar
Computer networking : a top-down approach / James F. Kurose, Keith W. Ross.—6th ed. 2013. by Pearson Education, Inc., publishing as Addison-Wesley.
TCP/IP protocol suite / Behrouz A. Forouzan.—4th ed. Published by McGrawHill, a business unit of The McGraw-Hill Companies, Inc., 1221 Avenue of the Americas, New York, NY 10020. Copyright © 2010
Java Network Programming, Fourth Edition by Elliotte Rusty Harold. 2014. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol.
Do'stlaringiz bilan baham: |