Game Development Community

Giving input to the dedicated server

by Ian Omroth Hardingham · in Torque Game Engine · 11/18/2002 (5:47 am) · 10 replies

Hi,

What options do I have for a program to give input to a Torque dedicated server while it's running? Is any kind of piping supported?

Thanks,
Ian

#1
11/18/2002 (5:52 am)
Depends on the operating system. For Linux/UNIX I'd open a pseudo terminal and pipe the input/output.
#2
11/18/2002 (7:19 am)
what's a pseudo terminal?

Torque doesn't seem to be interacting with pipes properly. Can you give me any pointers?
#3
11/18/2002 (7:23 am)
Am I missing something here? As far as I'm aware, the dedicated server already allows you to enter commands/text. You don't have to do anything fancy to do this.
#4
11/18/2002 (7:31 am)
You're talking about the unix server, right? I wouldn't be too surprised if the console input code didn't work very well with pipes...are you trying to script server startup or something?
#5
11/18/2002 (7:44 am)
Quote:what's a pseudo terminal?
A pseudo terminal is what you'd open so that you could effectively communicate with the TGE app just as if you were running it from your "own" terminal. In fact, you're in a pseudo terminal when you open a shell. :-)

For example, something like: this groups.google.com post.

You can then read/write to the "master" to communicate with the process.

- rjp
#6
11/18/2002 (2:54 pm)
I've been misunderstood slightly: I want to write a program and a torque script which communicate with each other, so the output of the program can be read by the torque script.
#7
11/18/2002 (4:20 pm)
You can telnet into the server to issue commands and run the script debugger. Don't have more details, though.
#8
11/18/2002 (5:08 pm)
You can have an application that takes the output of one program and writes it to the input of the TGE app.
#9
11/19/2002 (4:22 am)
Thanks. Can you tell me how?
#10
11/19/2002 (8:29 am)
Check that google post above. Basically you'd use what's showing in the post to open the TGE app, then you'd open another process with popen() and just take what you read from that process and shove it to the TGE app. :-)