router: Bring TCP implementation closer to HTTP.

Fixes #56

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>