Skip to content Skip to sidebar Skip to footer

JavaScript Listen On A Port

I'm using dump1090 to listen to and decode ADS-B signals. It outputs the data over port 8080 to a web front end and all is well. The code also produces output over ports 30003 and

Solution 1:

Unfortunately, you can't use websockets to listen to raw tcp or udp socket, on the server side you need to create a websocket interface as well.

However in Chrome extensions you can make use of chrome.sockets.tcp see:

https://developer.chrome.com/apps/sockets_tcp

There is also some limited support by mozilla:

https://developer.mozilla.org/en-US/docs/Archive/B2G_OS/API/TPC_Socket_API

Another solution is creating a nodeJS server, which will be listening on the raw tcp socket and converting it to a websocket.

you can also try websockify: https://github.com/novnc/websockify


Post a Comment for "JavaScript Listen On A Port"