socket.io 16

socket.io namespace 사용 시 sids, io.to

socket.io namespace 유무에 따른 rooms, sids 구분 // namespace 를 / 만 사용할 경우 var mio = { rooms : io.sockets.adapter.rooms, sids : io.sockets.adapter.sids }; //io.sockets.to( socketid ).emit('event', data ); //io.sockets.in( roomid ).emit('event', data ); io.sockets.to( socketid ).emit('event', data ); io.sockets.to( roomid ).emit('event', data ); // namespace 다른 namespace를 사용할 경우 var mio = { rooms : io.o..

lang/node 2016.09.09

Messenger Platform - facebook for developers

Messenger Platform - facebook for developers Setup For this integration, you will need the following: 통합을 위해서 다음이 필요. Facebook App: The Facebook App contains the settings. This is where you will setup your webhook, retrieve your page access token and submit your app for approval. 페이스북 앱: 페이스북 앱 설정이 포합되어 있다. webhook 설정, 토큰 페이지 액세스를 검색, 승인을 위해 당신의 앱을 제출하라. Facebook Page: A Facebook Page will be us..

lang/node 2016.07.13

socket.io disconnect 전에 socket.leave 처리

socket.io 1.x 에서 disconnect 이벤트는 socket 에 저장된 id가 이미 삭제된 상태로 disconnect 이벤트가 처리된다. join된 room정보가 필요할 경우 socket.io 의 onclose 를 오버라이딩해서 처리하면 된다. io.of('/').on('connection', function(socket) { // overridding, ref:node_modules/socket.io/lib/socket.js:416 socket.onclose = function( reason ){ if (!this.connected) return this; //debug('closing socket - reason %s', reason); myfunc( this.id ); // myfunc(..

lang/node 2016.03.09

socket.io 1.3.7 cluster On Nodejs 5.1.0

NodeJS|Socket.IO how to send server handler to workers? Sticky session node-cluster-socket.io 【Node.js】socket.io + cluster で 400 (Bad Request) + Connection closed before receiving a handshake responseAdd Star Horizontally Scaling Node.js and WebSockets with Redis socket.io 1.3.7 + socket.io-redis On Node v5.1.0 에서 Cluster로 2개 이상 cluster.fork()를 할 경우 에러발생. 에러코드 WebSocket connection to 'ws://local..

lang/node 2015.12.10

PHP SocketIOClient.php On socket.io 1.3.7 Error

【Node.js】socket.io + cluster で 400 (Bad Request) + Connection closed before receiving a handshake responseAdd Star Engine.IO: the realtime enginef engine.io-parser Engine.IO client Engine.IO Protocol socket.io PHP SocketIOClient.php On socket.io 1.3.7 Error Bad Request socket.io 1.3.7 에서 php_io.php 라이브러리로 연결시 아래 에러가 발생한다. # Nodejs 5.1.0 + socket.io 1.3.7 engine intercepting request for path "/so..

lang/php 2015.12.02
반응형