Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Techtalk JDV : Pengenalan Socket.io

rifqi alfian
September 07, 2014

Techtalk JDV : Pengenalan Socket.io

techtalk jdv tentang pengenalan socket.io utk aplikasi realtime

rifqi alfian

September 07, 2014
Tweet

More Decks by rifqi alfian

Other Decks in Technology

Transcript

  1. Web Socket 1. Cross Origin Communication 2. Proxy, Firewall problem

    3. Open Connection, High Concurrency + Low Cost
  2. Socket.io : Konfigurasi Mekanisme Fallback : io.set('transports', [ 'websocket' ,

    'flashsocket' , 'htmlfile' , 'xhr-polling' , 'jsonp-polling' ]);
  3. Socket.io : Authentifikasi 1. Global dan Namespace 2. HanshakeData {

    headers: req.headers // <Object> the headers of the request , time: (new Date) +'' // <String> date time of the connection , address: socket.address() // <Object> remoteAddress and remotePort object , xdomain: !!headers.origin // <Boolean> was it a cross domain request? , secure: socket.secure // <Boolean> https connection , issued: +date // <Number> EPOCH of when the handshake was created , url: request.url // <String> the entrance path of the request , query: data.query // <Object> the result of url.parse().query or a empty object }