Game Development Community

HTTP Protocol Support?

by Eric Hardman · in Torque Game Engine · 10/25/2006 (10:51 am) · 6 replies

Hi.

Does Torque support HTTP communications and, if so, is it accessible from Torquescript? I need to communicate with an ad. server via http, preferably via Torquescript, to send it occassional statistical data.

Thanks.

About the author

Recent Threads


#1
10/25/2006 (11:09 am)
Check out TCPObject, and HTTPObject, both of which are instantiate-able from script, as well as accessable via ConsoleMethods.

Note that http protocols are pretty restrictive in syntax, and that there are a couple of useful tutorials/resources regarding how to best utilize them.
#2
10/25/2006 (11:28 am)
Thanks, Stephen.

I see the TCPObject but don't see an HTTPObject in the Torquescript documentation. Is it a v1.5 addition? Where do I find more documentation on it? I'm currently using v1.4.

Thanks.
#4
10/25/2006 (12:32 pm)
Hmm. Couple of questions there...

How do I access it through script instead of C++?

How do I access that page you referenced starting from here?
http://www.garagegames.com/docs/tge/

Thanks.
#5
10/25/2006 (12:49 pm)
For the second question, click on Torque Source Code Documentation, and then Class Hierarchy.

For the first, the ConsoleMethods aren't showing in dOxygen, so you can either:

1) Go to the source files (/engine/game/net/TCPObject.cc and HTTPObject.cc and look at the console methods available, or:

2) Go to TDN, and do a search for TCPObject. As it turns out, no one has yet written an article on the get and put console methods for HTTPObject, but there are a couple of threads in the forums regarding their use.
#6
10/25/2006 (2:56 pm)
There is a "persistant character" resource which shows how to use httpobject from script