Rewrote TCP socket opening and binding