WebSockets
Created for the need of low latency and high bandwidth web app traffic like that of social media chat windows.
WebSocket features:
Full duplex (send and rec simultaneously)
Uses HTTP proto and port 443/80
ws:// (websocket) and wss:// (secure websocket)
no polling, send when you have data.
Basic WS usage:
var ws=new WebSocket('ws://<WebsocketServerURL>');ws.onopen=function(e){
alert("Conenction Made");
this.send('<Your message>');
)ws.onmessage=function(e){
alert("Recieved Message");
var msg=e.data;
alert(msg);
}WebSockets themselves are not insecure but they do fall victim to vulnerabilities in how the data is used if unsanitized.
Last updated
Was this helpful?