T
TBass
Hi,
I wrote an app that accepts a client connection.
[snip]
SOCKADDR_IN sockAddrIn;
unsigned int clientLen = sizeof( sockAddrIn );
SOCKET conn = accept( m_Socket, (struct sockaddr *)&sockAddrIn,
NULL );
if ( conn == INVALID_SOCKET )
{
int errorno = WSAGetLastError();
if ( errorno != WSAEWOULDBLOCK )
{
return -1;
}
else
{
return false;
}
}
else
{
CFusionSCK_Client myclient(m_ConnFlags);
myclient.Socket( &conn );
myclient.AddrIn( &sockAddrIn );
myclient.IPAddress( inet_ntoa( sockAddrIn.sin_addr ) );
myclient.Port( sockAddrIn.sin_port );
m_listClients.push_back( myclient );
}
return false;
[/snip]
The IP address pulled out of the SOCKADDRIN structure is always
204.204.204.204, no matter what machine I connect from. The connection
is otherwise functional. Has anyone had this problem before?
Thanks in advance,
Tom
I wrote an app that accepts a client connection.
[snip]
SOCKADDR_IN sockAddrIn;
unsigned int clientLen = sizeof( sockAddrIn );
SOCKET conn = accept( m_Socket, (struct sockaddr *)&sockAddrIn,
NULL );
if ( conn == INVALID_SOCKET )
{
int errorno = WSAGetLastError();
if ( errorno != WSAEWOULDBLOCK )
{
return -1;
}
else
{
return false;
}
}
else
{
CFusionSCK_Client myclient(m_ConnFlags);
myclient.Socket( &conn );
myclient.AddrIn( &sockAddrIn );
myclient.IPAddress( inet_ntoa( sockAddrIn.sin_addr ) );
myclient.Port( sockAddrIn.sin_port );
m_listClients.push_back( myclient );
}
return false;
[/snip]
The IP address pulled out of the SOCKADDRIN structure is always
204.204.204.204, no matter what machine I connect from. The connection
is otherwise functional. Has anyone had this problem before?
Thanks in advance,
Tom