I am new to C ++ and I am trying to develop a client-server application based on the boost :: asio library. I (still) am not able to correctly understand the difference between synchronization and asynchrony modes. I previously studied web protocol services such as HTTP and AJAX. From this explanation , it is clear that HTTP is synchronous and AJAX is asynchronous. What is the difference in TCP socket connection in terms of synchronization and asynchrony? And which mode is better from the point of view of developing multi-threaded applications at the enterprise level and why?
As I understand it, synchronous mode, the client blocks for a while until it receives a packet / data message from the server. And in asynchronous mode, the client performs another operation without blocking the current operation. Why is it different? Is UDP an asynchronous synonym? It does not seem to matter to him whether he receives confirmation of the transfer.
source share