Giter Site home page Giter Site logo

web_client_socket's Introduction

💞WEB CLIENT SOCKET💞

💘 Đồ án thực hạnh mạng máy tính - Đề 02 : Web Client

😶‍🌫️ GIỚI THIỆU : Mục tiêu là viết một web client đơn giản. Web client sẽ gửi request đến web server, port 80 để tại nội dung của page và lưu vào file .

😶‍🌫️ HANDLE CONNECTION CƠ BẢN .

😾 Client tạo một TCP socket, kết nối đến port 80 của web server. Sau khi kết nối đến web server, client sẽ gửi request đến web server để tải page.

😾 Client yêu cầu sử dụng HTTP/1.1 và "Connection: keep-alive", khi đó hàm "recv" sẽ vẫn chờ nhận dữ liệu mặc dù đã nhận đủ nội dung file.

😾 Ta cần tính toán để biết khi nào đã nhận xong data và đóng kết nối. Vậy làm sao Client có thể biết được là đã nhận đủ data, thì bạn dựa vào một trong các trường hợp:

😶‍🌫️ MÔI TRƯỜNG LẬP TRÌNH VÀ ỨNG DỤNG .

• Ứng dụng được viết trên hệ điều hành Windows 11 .

**• Ngôn ngữ lập trình : Python 3 . • IDE sử dụng : Visual Studio Code.

• Các dữ liệu được lưu trữ tại các folder theo yêu cầu .

• Thư viện hỗ trợ : socket , sys, threading ,os.path , bs4 from BeautifulSoup , string.

😶‍🌫️ HƯỚNG DẪN SỬ DỤNG .

👻 1 . Tải và lưu file hay các folder với các chức năng cơ bản => Sử dụng file run_basic.py

1

👻 2 . Tải vầ lưu file ở các chức năng nâng cao => Sử dụng các file multiple_connection.py hoặc multiple_requests.py

2

👻 3 . Chú ý : Các máy tính phải được cài đặt môi trường cho python .

web_client_socket's People

Contributors

tanhiep-to avatar

Watchers

 avatar

Forkers

adthunder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.