Hi there,
I have been reading about the various memory management issues that .NET Asynchronous Sockets have.
There are but a handful of links, but spidering this one will get you them all: http://codebetter.com/blogs/gregyoung/archive/2007/06/18/async-sockets-and-buffer-management.aspx
Basically
when a socket is asynchronously sending/receiving many small byte[]'s
the send/receive byte[]'s are pinned in memory
leading to fragmentation.
SO for the purposes of creating a buffer manager : I have a managed buffer (byte[])
byte[] managedBuffer = new byte[1024];
// do stuff with managedBuffer;
how do I send this byte[] to the socket's asynchronous .BeginSend() method by reference?
// I don't want to pass the VALUE to the method, but a reference
// to managedBuffer;
System.Net.Sockets.Socket.BeginSend(managedBuffer...(other params));