1

I'm developing a client-server infrastructure with file sharing, chat, and some server tracking functions.

I need to create three persistent TCP connections for each since they'll use separate protocols and, often, separate server instances. I haven't begun to design the communication stuff because I'm uncertain as to which type of system I should design it as: async or sync?

If I choose Async, what benefits will it give to me relative to the three other protocols?

If I choose Sync, will two chat messages sent in a short time span from each other, for example, be subject to one of them being lost, or delayed, due to the other one's send process?

I hope my question isn't too unclear.

Fuselight
  • 554
  • 6
  • 17

1 Answers1

1

There is no difference between what you can accomplish with sync and with async. The features of the sockets API do not change. Only the call mechanism changes.

The benefits of sync and async are non-functional in nature. See also: Should we switch to use async I/O by default?

This answers your question as asked. If there is some specific issue or confusion leave a comment.

Community
  • 1
  • 1
usr
  • 168,620
  • 35
  • 240
  • 369
  • Thanks. All the talk about Async and multitasking made me think that it was the only way for a program to multitask. I was worried this would limit my user. – Fuselight Oct 10 '14 at 13:54