Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- socket.on('data', function(chunk){
- decodeChunk(chunk.toString('hex'), function(response){
- if(response.name === 'toDB'){
- //write smth. to DB
- }
- if(response.name === 'readDB'){
- //watch all incoming tcp sockets with 'toDB' and continiously
- //send to client connected with this socket
- }
- });
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement