Long and short connections for Python sockets

Source: Internet
Author: User
Objective

Socket is a socket, which is a way of inter-process communication. The socket library hides the underlying, allowing us to focus more on logic. If the short connection and the long connection two probabilities do not understand, will be the pit can not climb up.

Short connection

A complete transfer process, the sender output stream is sent out and closed

Long connections

A TCP long connection is established between the server and the client, and if the sender output stream is not closed, the receiver will not consider the end and will wait until the timeout is reached.

Summarize

Socket programming involves a lot of knowledge points, when encountering problems should refer to the following knowledge points between the process of communication TCP/IP model

The reference connections are: http://blog.csdn.net/yaohonv/article/details/6746410

Long and short connections for Python sockets

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.