heavy tcp typing/optimizations