Network Programming: synchronous, asynchronous, blocking, non-blocking, and network programming
I. Network Programming I/O models always involve these concepts. I have asked a lot of people, but few of them can clearly tell the difference between
Original: http://blog.csdn.net/historyasamirror/article/details/5778378
When you find that your most popular blog is a big mistake, this is definitely not a pleasant thing to do.IO-Sync, asynchronous, blocking, non-blocking I wrote when I began to
The code has been coded once, and it's summed up:
First of all, synchronous/asynchronous is a relatively large concept, it applies to many aspects, blocking/non-blocking is not only in the socket, of course, we discuss the following mainly in the
Turn from: http://blog.csdn.net/historyasamirror/article/details/5778378
When you find that your most popular blog is a big mistake, this is definitely not a pleasant thing to do.IO-Sync, asynchronous, blocking, non-blocking I wrote when I began
Background
Many people are not clear on the concept of synchronous asynchronous, blocking non-blocking, and there are several completely different views on the Internet, but there is a lot of controversy about this part.
The author also in this part
Good article, from: http://blog.csdn.net/yankai0219/article/details/8018232
0. OrderFirst of all, read the content of the reference article to learn about it. I will write it below. In addition, I refer to the writing methods in the above articles
I like to explain some concepts by connecting to some phenomena in real life in my own language. When I can do this, it means that I have understood this concept. the concept to be explained today is: the difference between synchronous/asynchronous
First, we will explain the concepts of synchronous and asynchronous, which are related to the notification mechanism of messages.
For example, if I go to a bank to handle business operations, I may choose to wait in queue or take a small note with
Synchronous/asynchronous and blocking/non-blocking)
Asynchronous I/O From Wikipedia, the free encyclopedia
Asynchronous I/O, OrNon-blocking I/O, Is a form of input/output processing that permits other processing to continue before the transmission
Many people put synchronization, Asynchronization, blocking, and non-blocking together for discussion, which is often difficult to differentiate.
Let's take a root look at these concepts.
First, asynchronous synchronization is relative to
Basic Winsock knowledge
We do not plan to systematically introduce socket or Winsock knowledge here. First, we will introduce the Winsock API function, introduce the concept of blocking/non-blocking, and then introduce the use of socket.
Winsock
Transferred from: http://blog.chinaunix.net/uid-26000296-id-3754543.htmlIntroduction:Linux? The most commonly used input/output (I/O) model is synchronous I/O.In this model, when a request is made, the application blocks until the request is
The concept is important and must be mastered. Practice is based on their own yo~~~~~~~~~~~~~~~~~http://blog.csdn.net/historyasamirror/article/details/5778378Stevens compared five IO Model in the article:Blocking IOnonblocking IOIO
The synchronous and asynchronous mechanisms in network communication describe communication patterns. Synchronization mechanism, refers to the sender after sending a request, waiting to receive a response sent back by the receiver before starting to
Callback--A pointer to a method is passed to the event source, and the event source calls this method in turn after the event has occurred. This method is called a callback function.In Java, a callback function is typically defined by an abstract
Synchronous asynchronousBlocking non-blockingAs the above two concepts are easy to confuse, and the actual situation is that they sometimes have similar effects, the main similarity is not to wait for others, the following simple summary of their
From http://www.cppblog.com/converse/archive/2009/05/13/82879.html
First, we will explain the concepts of synchronization and Asynchronization. Notification Mechanism of messages Related. For example, if I go to a bank to handle business
1. Sync:The so-called synchronization is that when a function call is made, the call does not return until the result is obtained. But once the call returns , you must first get the return value .In other words, the caller actively waits for the
JavaScript is a single-threaded in-depth analysisFirst of all: Why is JavaScript single-threaded but it allows Ajax to be sent and callback requests, and SetTimeout also look like multi-threaded?First Look at example 1:1 function foo () {2
I. Conceptual understanding1. Synchronous Asynchronous:Synchronous and asynchronous concern is that the message communication mechanism (synchronous communication/asynchronous communication) is called synchronization, that is, when a * call is
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.