It's not simple to create TCP Socket connection on the browser end using JavaScript to connect to a server. Although solutions like Websockets allow to create something that resemble sockets, you can use them to connect only to servers that support
Websockets[
^].
Perhaps, you could look at something like
SignalR [
^]to push the updates to your browser.
Look at these links to understand more:
http://artemyankov.com/tcp-client-for-browsers/[
^]
Introduction to SignalR[
^]