Saturday, June 30, 2012

TCPRelay 0.1.1 beta

Let me start this blog by talking about one of my simplest (and quite successful) projects: TCPRelay. This is a very simple program whose main purpose is to help users of XSplit (used to run my gaming stream) deal with some upload bandwidth issues. It started as a quick and dirty program that served as a relay between XSplit and the Twitch.tv server and became a nice little command-line tool that made a lot of people happy.

It works like this: while TCPRelay is running, it is listening to a TCP port in the local machine which is by default 1935. For every connection made to this port, a new connection will be made to the target server, the default being live.justin.tv:1935. Every byte TCPRelay receives on the local connection will be sent to the target server, and all responses made by the server will be transferred to the local connection. It is, in fact, a data relay, doing nothing but transferring data from one side to the other. XSplit users will have to go through the process of creating a custom connection to the local machine so as to make the program send and receive data through TCPRelay instead of connecting directly to the streaming servers. Some would call this a proxy, but it lacks the ability to dynamically choose the target server (which is impossible, given the network protocol used).

So now you are asking: how did this solve the upload bandwidth problem? The answer is something that eludes me and a few XSplit developers alike. Somehow, it works. I like to call it magic. See for yourself:

XSplit bandwidth test without TCPRelay

XSplit bandwidth test without TCPRelay

XSplit bandwidth test with TCPRelay

XSplit bandwidth test with TCPRelay

Amazing, huh? By the way, the game running behind it is StarCraft II: Wings of Liberty.

You can download version 0.1.1 beta (latest as of this writing) here. Also check out the official topic on XSplit's forums and see for yourself all the great feedback people gave me.

Welcome!

Welcome to my blog!

In this blog I will be talking a bit about what I do as a hobby -- gaming and programming. When I'm not hacking through enemies, I'm most certainly hacking through code. I will be talking about my personal projects and giving hints, tips and tutorials about all sorts of programming topics, from basic to advanced. Expect to see a lot of things related to game development here! As for games, I'll probably be showing off my achievements and feats and some news, hints and tips. :)