Click here to Skip to main content
15,920,632 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing one website in which i want to show continuous price update for which i am connecting to TCP Server which is running on MS Windows on particular IP and port.
Can anyone suggest me how to connect to that server using java-script code which can be used by mobile web site, so that i can receive continuous price update.
Posted
Updated 18-Nov-14 4:58am
v2

1 solution

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[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900