1. 2016. 11. 2. 18:24 개발자료/W3C
ws 로 시작하는 프로토콜을 가집니다
경로를 지정하여 접속 할 수 있습니다
전반적으로 비동기 처리를합니다

(function(){
  var ws=new WebSocket(location.protocol.replace("http","ws")+"//"+window.location.host+"/io/");
  ws.onopen=function(event){
    console.log("onopen");
    ws.send("s\r\n"+el.cookie.get("s"));
  };
  ws.onmessage=function(event){
    console.log("onmessage");
  };
  ws.onerror=function(event){
    console.log("onerror");
  };
})();
Posted by Nightly Luna
,
이전 1 2 3 4 5 6 ··· 337 다음
® © Tanny Tales
/ rss