What I have : A C++ application server running, Ready to send data to client which is supposed to a HTML5 page or app.
What I want : Is there any way to communicate using udp port with HTML5 given both c++ server and HTML5 app are local to system ?
What I know :
Is the answer still 'NO' ?
Is there any work-around possible ?
Any lead is appreciated.
UDP packets are not encrypted, so any data sent over these packets could be sniffed and read by an attacker, or even modified in transmit. It would be a massive step back for web security to create a new way for browsers to send unencrypted packets.
UDP is connectionless. A server can immediately listen for messages once it has a socket.
As far as I remember bind is not required for a UDP socket because a bind call is made for you by the stack.
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/
Chrome now seems to have something: https://developer.chrome.com/apps/sockets_udp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With