cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl in Team Fortress 2

From: Tim Bannister <isoma_at_jellybaby.net>
Date: Thu, 30 Jun 2011 08:49:36 +0100

On 30 Jun 2011, at 02:43, Jon Lippincott wrote:

> Hi all,
>
> We are using libcurl on the server-side for the TF2 replay system, and could use some help diagnosing some problems.
>
> Without getting into too much detail<http://forums.steampowered.com/forums/showthread.php?p=22333197#post22333197>, the gist of the system is that replay-enabled servers use libcurl (7.21.2) to offload small chunks of data over FTP, every 15 seconds or so. Clients can then get at the data over HTTP.

How often will Go() be called? If that's every 15 seconds, you could profitably cache the IP address corresponding to m_szHostname, either for the duration of the level or for the TTL of the record (perhaps clamped to some sane maximum value). Then construct a URL using the IP address instead of the hostname. FTP doesn't use name based virtual hosting so this won't be an issue.

If in future you switch to HTTP PUT, you can keep the TCP connection open from the replay-enabled server to the upload host, and even use Range: and If-Range: request headers to append data to an existing document. Many HTTP client libraries can help with doing the keepalive (and possible reconnection) for you.

-- 
Tim Bannister - +44 7980408788 - isoma_at_jellybaby.net

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

  • application/pkcs7-signature attachment: smime.p7s
Received on 2011-06-30