Maybe its a bug in my network code, but I had a problem with yer HandleInput functions not being called...
under NetSocket I have to do a NetSocketPtr->GetCast<...> before calling each NetSocket's HandleInput(), because otherwise itll only call the parent's HandleInput()...
If you go look under BaseSocketManager.DoSelect(), where it has:
----------------------------------------------------------------------
if (selRet)
{
for (SocketList::iterator i = m_SockList.begin(); i != m_SockList.end(); ++i)
{
pSock = *i;
if ((pSock->m_deleteFlag&1) pSock->m_sock == INVALID_SOCKET)
continue;
if (FD_ISSET(pSock->m_sock, &exc_set))
{
pSock->HandleException();
}
if (!(pSock->m_deleteFlag&1) && FD_ISSET(pSock->m_sock, &out_set))
{
pSock->HandleOutput();
}
if ( handleInput
&& !(pSock->m_deleteFlag&1) && FD_ISSET(pSock->m_sock, &inp_set))
{
pSock->HandleInput();
}
}
}
--------------------------------------------------------------------------
we need a pSock->GetCast<...> before calling HandleInput() to make sure it is called under each inheritance correctly right? Maybe I missed something, ill look some more, but from what I can tell so far this should be the problem.
Next note, after I get the correct call under NetListenSocket->HandleInput() and AcceptConnection is ran, I am getting an error back from the accept(..) call as WSAENOTSOCK. I think there is an error somewhere in here as well that im looking into.
Question is, has any1 actually ran a connection yet using this code?
Thanks,
Brad
under NetSocket I have to do a NetSocketPtr->GetCast<...> before calling each NetSocket's HandleInput(), because otherwise itll only call the parent's HandleInput()...
If you go look under BaseSocketManager.DoSelect(), where it has:
----------------------------------------------------------------------
if (selRet)
{
for (SocketList::iterator i = m_SockList.begin(); i != m_SockList.end(); ++i)
{
pSock = *i;
if ((pSock->m_deleteFlag&1) pSock->m_sock == INVALID_SOCKET)
continue;
if (FD_ISSET(pSock->m_sock, &exc_set))
{
pSock->HandleException();
}
if (!(pSock->m_deleteFlag&1) && FD_ISSET(pSock->m_sock, &out_set))
{
pSock->HandleOutput();
}
if ( handleInput
&& !(pSock->m_deleteFlag&1) && FD_ISSET(pSock->m_sock, &inp_set))
{
pSock->HandleInput();
}
}
}
--------------------------------------------------------------------------
we need a pSock->GetCast<...> before calling HandleInput() to make sure it is called under each inheritance correctly right? Maybe I missed something, ill look some more, but from what I can tell so far this should be the problem.
Next note, after I get the correct call under NetListenSocket->HandleInput() and AcceptConnection is ran, I am getting an error back from the accept(..) call as WSAENOTSOCK. I think there is an error somewhere in here as well that im looking into.
Question is, has any1 actually ran a connection yet using this code?
Thanks,
Brad