Opening and sending and receiving data over a TCP connection

Is that possible with workers? How is that done with JavaScript?