Reading from udp port in browser
What you are looking for can't be done with in Javascript due to security constraints such as Distributed Denial of Service (DDOS) attacks. The closest technology available (that I know of) for client-side JS is WebRTC.
With WebRTC you can use DataChannels over SRTP and ICE as a possible solution.
See Also:
- How to send a UDP Packet with Web RTC - Javascript?
- Can I use WebRTC to open a UDP connection?
How to talk to UDP sockets with HTML5?
Yes, the answer is still 'no'. Websockets are TCP based. Note that a WebSocket is not a plain TCP connection, there is HTTP negotiation and a framing protocol in place. So you also cannot create a plain TCP connection in Javascript.
WebRTC is based on UDP, it may cover your use cases: http://www.html5rocks.com/en/tutorials/webrtc/datachannels/
Why can not I open a UDP connection on the client side (in browser)?
The browsers don't support it due to security constraints.
You should take a look at WebRTC
see also
- How to send a UDP Packet with Web RTC - Javascript?
- Can I use WebRTC to open a UDP connection?
How can we read/listen a UDP port in linux server and save the incoming data to MYSQL DB
to listen an UDP with php you can use sockets. There is a good example to start with. And about your second question, yes, you can use either cron launch of your script or php like a daemon.
Related Topics
JavaScript Sort Function. Sort by First Then by Second
How to Insert a Character After Every N Characters in JavaScript
Write/Add Data in JSON File Using Node.Js
Why Would Multiple Simultaneous Ajax Calls to the Same ASP.NET MVC Action Cause the Browser to Block
Check If Point Is Inside a Polygon
Ternary Operators in JavaScript Without an "Else"
Window.Open(Url, '_Blank'); Not Working on Imac/Safari
JavaScript Seconds to Minutes and Seconds
How to Copy Text from a Div to Clipboard
How to Remove a Buggy Service Worker, or Implement a "Kill Switch"
Calling JavaScript Function in Iframe
How to Find the Array Index with a Value
How to Force Angular2 to Post Using X-Www-Form-Urlencoded
How to Limit Panning in Google Maps API V3
Keys in JavaScript Objects Can Only Be Strings