Author Topic: Torque, TCPObject problem, Listen  (Read 2777 times)

Well, I try to set up a tcpobject listening on a port I defined so I can connect to the server directly using php.

But It just doesn't seem to work, maybe someone in here has some documentation about how to use the TCPObject, cause the .dump(); doesn't get me anywhere I want.


Example of what I want to do.

 - Let the BLR Server listen to the TCP Port 8080.
 - Connecting to the BLR Server using PHP on TCP Port 8080.
 - Using some stuff for authentification, this isn't really important and will depend on what I'm doing after the connection is initialized anyways.
 - The Server should also be able to send a response to things that it got from my php script.

I don't know if anyone in here ever did something like that. (Hope someone did).

Greetings
  Zerosan


Note: I've already searched in the GarageGames Forums and Wiki, also in here and in the RTB Forums and Wiki.
« Last Edit: June 14, 2007, 07:07:37 AM by Zerosan »

I really, really, highly doubt this can be done. Technically speaking, it's possible, but it's just waaay too difficult to reverse engineer the torque networking code. Also, keep in mind that php is a lot slower than c++ and you'll have to send hundreds of packets per minute. Why do you want to connect to a bl server in php anyway?

Official GG Stuff

TDN Wiki reference for TCPObject
http://tdn.garagegames.com/wiki/Torque_Console_Objects_13#TCPObject

TCPObject Class Reference in the TGE Docs
http://www.garagegames.com/docs/tge/engine/classTCPObject.php

GG Site Search for TCPObject
http://ln-s.net/Enf

Unofficial References and examples

Harold "LabRat" Brown's Awesome TCPObject Tutorial
http://realmwars.feylab.com/tutorial/Tutorial1.htm


Some of that stuff could be out of date, but I don't think it's changed that much. I hope that helps. Everything you're doing sounds possible, but I see your biggest problem being security. It's pretty tough to make some secure connections in Torque-script, especially since all of our source has to be free.

If you don't mind me asking, what are you wanting to do?

well, the secure connection won't be a problem. There are ways of securing the connection using external programs if needed.

I found something I could use in the GG Wiki.

telnetSetParameters(Port, ReadWritePassword, ReadPassword);

this will start a telnet service, so that you can have a remote console^^


For security, there is VPN, that should be enough.
When security get's more important I will start to create it :D


Ah, and Moocheze, theese pages don't get me any further, most of them are only for TGE Owners, and I need some more information about it. Best would be an example for the listen method.

Official GG Stuff

TDN Wiki reference for TCPObject
http://tdn.garagegames.com/wiki/Torque_Console_Objects_13#TCPObject

TCPObject Class Reference in the TGE Docs
http://www.garagegames.com/docs/tge/engine/classTCPObject.php

GG Site Search for TCPObject
http://ln-s.net/Enf

Unofficial References and examples

Harold "LabRat" Brown's Awesome TCPObject Tutorial
http://realmwars.feylab.com/tutorial/Tutorial1.htm


Some of that stuff could be out of date, but I don't think it's changed that much. I hope that helps. Everything you're doing sounds possible, but I see your biggest problem being security. It's pretty tough to make some secure connections in Torque-script, especially since all of our source has to be free.

If you don't mind me asking, what are you wanting to do?

Anything with tdn.garagegames.com you need the engine tto access.

Shame you cant pirate GG Privileges too then, isn't it?