Out of memory issue, if I send the string too long


I program using SocketIO4Net in C#, and use the socket.Emit() to send the message.

If the message is very short, it works perfectly. But if I send a string of 10000000 charterers, after sending nearly 80-90 times, it occurs the problem :
A first chance exception of type 'System.OutOfMemoryException' occurred in mscorlib.dll

If I send a string of 5000000 charterers, after sending nearly 170 times, it will occur the same problem.