Game Development Community

1.7.1] TCPObject cannot connect after DNS resolution

by Frank Bignone · in Torque Game Engine Advanced · 09/27/2008 (9:38 pm) · 1 replies

It looks like there is a slight bug when using TCPObject to connect to an address with a name, aka www.xxx.com. Indeed, after the DNS resolution the connect command may be pending; but in the code the system immediately cancel the connection.

To correct it, just change this line in platformNet.cpp (line 662)
if (errno == EINPROGRESS)

by this line
if (errno == EINPROGRESS || GetLastError() == WSAEWOULDBLOCK)

After that changes, all my connections to our server where successful. Only issue is that I used a WIN32 specific called which may not be compliant for a multi-platform port of TGEA.

About the author

Real programmers don't waste time recompiling; they patch the binary files... ... Real programmers don't waste time patching binary files; they patch memory.


#1
09/28/2008 (9:44 pm)
Fix for that is here


http://www.garagegames.com/mg/forums/result.thread.php?qt=76414