But if it is to monitor buffer, it is how to distinguish the FD_ACCEPT or FD_READ events,
Another question: I think the select () model is an asynchronous block model, without blocking model, according to the following standards,
Lao zhang want to use the kettle to boil water, then he has the following four:
Lao zhang put kettle on the fire, then stood waiting, during he didn't do anything, until the water is boiling (synchronous blocking);
(2) Lao zhang put kettle on the fire, then go to the living room watching TV, occasionally go to the kitchen again see whether the water had opened a non-blocking (synchronous);
(3) Lao zhang put a would whistle kettle on the fire, then stood waiting, wait until the water boiled honking blocking (asynchronous);
(4) will put horns at the old kettle on the fire, then go to watch TV, no longer went to see it before don't whistle kettle, etc. After hearing the honking to take pot (asynchronous non-blocking),
Visible, synchronous and asynchronous for kettle, normal kettle: synchronization; Sound kettle, induction, and blocking and non-blocking is specific to Lao zhang, standing by Lao zhang: such as blocking; Lao zhang: watching TV non-blocking,
CodePudding user response:
WSAAsyncSelect bottom I think is that subscribe to release observer, subscribe to the event, will be informed when the event occurs, the subscriber,And the select IO is active view, every time see the incident did not actively,
Select other operating recv the send is still blocked synchronized,
CodePudding user response:
Take what you need to see first events associated with a socket for registration