The latest version of the licensed socket server framework contains a memory leak in the CSocketServerEx class. It's quite a good leak, it leaks an IO buffer on every connection attempt. The fix is as follows:
Change this code:
void CStreamSocketServerEx::PostAcceptRequest()
{
if (m_listeningSocket != INVALID_SOCKET)
{
if (m_connectionLimiter.CanCreateConnection())
{
IncrementPendingReceives();const IFullAddress &address = GetAddress();
IStreamSocketEx *pSocket = AllocateSocket(CreateSocket(address.Type())).Detach();
IBuffer *pBuffer = AllocateBuffer();
pBuffer->SetUserPtr(m_socketIndex, pSocket);
PostIoOperation(pBuffer, IO_Accept_Request);
}
else
to this:
void CStreamSocketServerEx::PostAcceptRequest()
{
if (m_listeningSocket != INVALID_SOCKET)
{
if (m_connectionLimiter.CanCreateConnection())
{
IncrementPendingReceives();const IFullAddress &address = GetAddress();
IStreamSocketEx *pSocket = AllocateSocket(CreateSocket(address.Type())).Detach();
CSmartBuffer buffer(AllocateBuffer());
buffer.Get()->SetUserPtr(m_socketIndex, pSocket);
PostIoOperation(buffer.Get(), IO_Accept_Request);
}
else
Hi!
How can I obtain the licensed version of the socketserver framework? I didn't find any detail in the blog.
I'll email you details.
Posted by: Len at February 7, 2007 09:52 AMHi,
I am interested in your licensed sockerserver framework as well. Can you send me the details too?
Posted by: Ricky at February 9, 2007 11:23 AMCould you email me the details of your licensed socket server and the price?
thank you!
Posted by: hiber at February 9, 2007 03:37 PMHowa about the free version?Does the same bug exit?
Posted by: at March 1, 2007 11:30 AMThe free version of the acceptex server hasnt been updated from the original source code and I no longer support it. I've no idea if the bug exists in that version of the code.
Posted by: Len at March 2, 2007 12:37 AM