Game Development Community

Serving multiple files with TCPObject

by Ian Omroth Hardingham · in Torque Game Engine · 04/30/2008 (2:53 am) · 2 replies

Hey guys.

I integrated the files-over-TCPObject resource and it works great.

I have a need to serve possible a lot of users with files at once and I'd like to make sure TGE is going to be able to handle it. If I was serving say 100 files at once would using 100 TCPObjects be a stupid idea? Can anyone recommend anything better? Or would TGE be able to handle it?

Thanks,
Ian

#1
04/30/2008 (4:38 am)
Hi Ian,

What's the server running, TGE? You don't have to manually open one TCPObject per connection, that is handled automatically and connections are stored via a hash table. However unlike UDP, TCP uses one socket per connection so that's where you're going anyway.

We used a webserver to serve the files, connecting trough TGE, and it worked very well. Torque's TCPObject listen-mode was back then not functioning as it should had, so we had to use a webserver instead. Can't remember the specifics, but I think it was dropping parts of the stream when we transfered files.

So for client-side TGE is more than suitable.
#2
04/30/2008 (5:17 am)
Hey Stefan, thanks for the reply.

The file transfer in TGE appears to be working now. I am running TGE - it's kind of a pseudo-game and master server for various reasons. I think I'll try it just with TCPObject and look for alternatives if I come accross a problem.