Shim for W3C TCPSocket API over chrome.socket and node net/tls