If I use:
connectionSocket.BeginSend(data, 0, length, SocketFlags.None, out error, new AsyncCallback(SendDataDone), state);
Is SendDataDone callback called even in cases when operation was completed synchronously or should I test for asyncRes.CompletedSynchronously and know if it returns true that my callback was not called ?
I would expect that the callback is always called…
Supposedly, yes, see https://stackoverflow.com/a/635951/555547.