Opened 20 years ago

Last modified 20 years ago

#248 closed Bug report

CAsyncSocketEx::IOCtl() returns wrong result

Reported by: mrdoubleyou Owned by:
Priority: normal Component: Other
Keywords: Cc: mrdoubleyou, Tim Kosse
Component version: Operating system type:
Operating system version:


The return value of CAsyncSocketEx::IOCtl() should be
CAsyncSocketEx::IOCtl() calls ioctlsocket() which
returns 0 if success, and SOCKET_ERROR if not

CAsyncSocketEx::IOCtl() therefore should return TRUE
if ioctlsocket() returns 0. This is not the case at the
This causes problems in WindowProc() of
AsyncSocketEx.cpp when processing the FD_READ

A correct implementation of IOCtl() would be:

BOOL CAsyncSocketEx::IOCtl( long lCommand,
DWORD* lpArgument )

return (SOCKET_ERROR != ioctlsocket

(m_SocketData.hSocket, lCommand, lpArgument));

Change History (1)

comment:1 by Tim Kosse, 20 years ago

Thanks for the fix

Note: See TracTickets for help on using tickets.