i have a socket, im using to send large buffers through, if ill do something like
// may be accsed form a a lot of threads
void Send(byte[] buffer)
{
m_socket.BeginSend(buffer ... , SendCallback);
}
void SendCallback()
{
m_socket.EndSend()
// if not done sending- send the reset
m_socket.BeginSend()
}
my question is: will this work from a multithreading stand point, or will the buffers interleave?
Quoting MSDN:
But if you are sending blocks of data from multiple threads, what is your definition of ‘order’ anyway?