Asio: Synchronous? Asynchronous?

Hi, first time poster here.

I've been trying to work my way through some Boost::Asio tutorials, and one thing just hasn't been explained at all. What is the difference between a synchronous client or server and an asynchronous client or server?

From what I can tell, synchronous servers tend to be less complicated, but beyond that I have absolutely no idea. Google hasn't been much help in this regard, either.

Either an explanation here, or documentation for further reading would be most appreciated.

Thanks,
D
Sync clients everything happens in serial. If you send a command, it'll get queued behind the previous one until it's finished. Typically a single-threaded application.

ASync thinks happen simultaneously. Usually multi-threaded applications that will undertake multiple tasks at the same time.
Thanks for the reply.

When I was learning socket programming in Java (admittedly, an entirely different animal) I was taught to thread off socket operations so that clients communicated with the host synchronously (I think), but with each client having their own thread.

Does this still qualify as synchronous communication? Should I have been using asynchronous?

Thanks
D
Each thread is synchronous to it's own socket. But it'd act Async with other components of the application.
On top of it (as above said)
Synchronous blocks the process until the call sent to server is finished and returned, where as the Asynchronous does not wait for the return/result of the call, it just calls the server and proceeds with next instruction.

Good luck :)
Topic archived. No new replies allowed.