I have some legacy code using a CAsyncSocket derived class. This class overrides OnReceive
and it also has a wrapper around SendTo. The code is in a dll which multiple applications will be using on the same PC, all ports are hard coded.
I'm guessing that I need to provide synchronization in the form of a named mutex (CMutex in MFC) class bit I'm not sure.
Should I lock a named mutex in the OnReceive and a different named mutex in the Send methods of CMyAsyncSocket?
Do I need synchronization at all or will the MFC CAsyncSocket do that for me? Worried about accessing a socket on multiple processes.