An ugly hack to get larger objects over a TCP socket