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 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.