socket.handler.js 425 B

123456789101112131415161718192021
  1. /**
  2. * Created by Sand on 2016/11/17.
  3. */
  4. "use strict";
  5. var log = require("../util/log.js");
  6. var PatientClient = require('./PatientClient');
  7. var clients = {};
  8. module.exports.onConnection = function(socket){
  9. log.info("Patient connected from WebSocket.");
  10. socket.on('data', function (data) {
  11. });
  12. socket.emit('welcome', {message: 'Welcome to IM server.'});
  13. };
  14. module.exports.onDisconnect = function () {
  15. };