HTTPObject and TCPObject in ios
by Daniel Delp · in Torque 2D Beginner · 07/08/2013 (6:33 am) · 1 replies
TCPSockets are turned off by default in ios. For my game idea I plan to communicate with my server via HTTP quite frequently. The reason for turning off TCPSockets by default is not real clear in the code:
After playing around for a bit I have come to the conclusion it is turned off because binding would require TCP hole punching when using IOS (or any situation where you can't port-forward for that matter). Is there more to it than that? Does anyone know if I will have any specific situational problems using HTTPObjects that I should test? I would be more than willing to share my changes, but as of now, the only reason I can see for having it disabled by default is so people don't assume they can listen while on iOS.
Any ideas/suggestions would be much appreciated.
//-Mat this is a bit of a hack, but if we don't want the network, we shut it off now.
// We can't do it until we've run the entry script, otherwise the script variable will not have ben loaded
bool usesNet = false; //dAtob( Con::getVariable( "$pref::iOS::UseNetwork" ) );After playing around for a bit I have come to the conclusion it is turned off because binding would require TCP hole punching when using IOS (or any situation where you can't port-forward for that matter). Is there more to it than that? Does anyone know if I will have any specific situational problems using HTTPObjects that I should test? I would be more than willing to share my changes, but as of now, the only reason I can see for having it disabled by default is so people don't assume they can listen while on iOS.
Any ideas/suggestions would be much appreciated.
About the author
Torque Owner Richard Ranft
Roostertail Games