Foundations of Python Network Programming 2nd edition phần 2

vào cuối của chương, bạn sẽ có một Windows Forms chương trình của một kích thước hợp lý. Trong chương này, bạn sẽ học: ❑ ❑ ❑ ❑ Làm thế nào để sử dụng đa dạng hơn các điều khiển để xây dựng một giao diện ứng dụng Làm thế nào để hiển thị một trang web trong một ứng dụng Làm thế nào | CHAPTER 2 UDP give us good practice with the Python network API before we move on to the additional complications that are brought by the use of tCp. Should You Read This Chapter Yes you should read this chapter and the next one on TCP if you are going to be doing any programming on an IP network. The issues raised and answered are simply too fundamental. A good understanding of what is happening down at these low levels will serve you very well regardless of whether you are fetching pages from a web server or sending complicated queries to an industrial database. But should you use what you learn in this chapter Probably not Unless you are talking to a service that already speaks UDP because of someone else s decision you will probably want to use something else. The days when it was useful to sit down with a UDP connection and bang out packets toward another machine are very nearly gone. The deployment of UDP is even rather dangerous for the general health of the IP network. The sophisticated TCP protocol will automatically back off as the network becomes saturated and starts to drop packets. But few UDP programmers want to even think about the complexity of typical congestionavoidance algorithms much less implement them correctly with the result that a naively-written application atop UDP can bring a network to its knees flooding your bandwidth with an increasing number of re-tries until almost no requests are actually getting through successfully. If you even think you want to use the UDP protocol then you probably want to use a message queue system instead. Take a look at Chapter 8 and you will probably find that 0MQ lets you do everything you wanted to accomplish with UDP while having been programmed by people who dove far deeper into the efficiencies and quirks of the typical operating system network stack than you could do without months of research. If you need persistence or a broker then try one of the message queues that come with their own servers for

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
55    324    1    10-05-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.