Truyen file qua mang

  • Published on
    14-Apr-2018

  • View
    221

  • Download
    0

Embed Size (px)

Transcript

<ul><li><p>7/30/2019 Truyen file qua mang</p><p> 1/3</p><p>Truyen file qua mang</p><p>Bao Cao e Tai TruyenFile Qua Mang</p><p>1. Giao thc s dung trong chng trnh</p><p>Chng trnh truyen file qua mang nay c viet bang ngon</p><p>ng Java, s dung giao thc TCP e truyen file. Giao thcTCP la giao thc trao oi thong tin co ket noi, trong Java</p><p>e cai at giao thc TCP ta dung lp Socket va</p><p>ServerSocket. Trong o, lp Socket dung e ket noi mot</p><p>may tnh en mot may tnh khac. Lp ServerSocket dung</p><p>e tao o cam may Server e cac may tnh khac ket noi</p><p>en. Giao thc TCP c xem la giao thc truyen d lieu</p><p>co o tin cay va an toan cao, khong mat mat d lieu vaang c s dung rong rai tren the gii.</p><p>2. To chc chng trnh</p><p>Chng trnh nay gom 5 lp : Goi.class, MyCell.class,</p><p>transferfile.class, Server.class, Client.class. Trong o, lp Client</p><p>va lp transferfile la hai lp thc hien cac nhiem vu chnh</p><p>(gi file va nhan file) cua chng trnh . Lp Client la giao</p><p>dien chnh cua chng trnh, c cai at may con. Lp</p><p>transferfile va lp Server e lang nghe cac ket noi cua</p><p>may con en may chu, c cai at ben may chu. Lp</p><p>Goi la mot goi d lieu c dung e truyen cac d lieu</p><p>t may chu en may con va ngc lai.</p><p>3. Cach s dung chng trnh</p><p>Ben may Client ta cai at lp Client, ben may Server ta cai</p><p>at lp Server. Dch cac lp nay bang trnh dch JDK. Sau</p><p>o, ben may Server se bat au lang nghe cac ket noi</p><p>t cac may Client, ben may Client se hien ra giao dien va</p><p>ngi dung se thao tac theo ch dan cua chng trnh.</p><p>Minh hoa bang hnh anh:</p><p>Nhom thc hien Nhom 9</p><p>1</p></li><li><p>7/30/2019 Truyen file qua mang</p><p> 2/3</p><p>Truyen file qua mang</p><p>1. Hnh anh Server ang lang nghe</p><p>2. Hnh anh giao dien cua chng trnh</p><p>e bat au ket noi gia Client va Server ta nhap so hieu</p><p>cong mac nh la 1234 va a ch cua may Server vao</p><p>giao dien cua chng trnh , ta co the upload file len th muc</p><p>Nhom thc hien Nhom 9</p><p>2</p></li><li><p>7/30/2019 Truyen file qua mang</p><p> 3/3</p><p>Truyen file qua mang</p><p>goc cua may Server bang cach chon mot hoac nhieu file</p><p>t bang chon file ben Client va bam vao nut upload, hoac</p><p>ta co the click oi vao bang chon file e gi file. Sau o ta</p><p>co the download file t th muc goc cua may Server</p><p>xuong may Client. Chng trnh nay c thiet ke ch khi</p><p>nao ngi dung upload file len may Server th mi co the</p><p>download file ve may Client c ,ch can thc hien viec</p><p>upload file ben Client mot lan th se download file c.</p><p>4. Cac van e a giai quyet c</p><p>Chng trnh nay a giai quyet c van e truyen d</p><p>lieu qua mang. Chng trnh nay co the upload va download</p><p>c cac d lieu co dung lng ln en vai chuc MB ma</p><p>khong b mat hoac h hong d lieu. Ben canh o chng</p><p>trnh con co cac thong bao cho biet d lieu a ton tai</p><p>va yeu cau co chuyen d lieu bang cach ghi e len hay</p><p>khong. Tuy nhien, v thi gian co han nen chng trnh cha</p><p>c hoan chnh, rat mong y kien ong gop cua thay</p><p>co va cac ban e chng trnh c hoan thien hn.</p><p>5. Thanh vien thc hien1. Nguyen Trung Ky</p><p>2. Nguyen Thanh T</p><p>3. Nguyen Th Hoai Thanh</p><p>4. Tran c Giang</p><p>5. Nguyen Thanh Man</p><p>Nhom thc hien Nhom 9</p><p>3</p></li></ul>