provides socket communication

  • you can use socket.io-client or net module of node.js to connect to remote (java, go, etc.) socket services.
  • you can connect the socket service of the framework to communicate with the EE framework in a third-party project.

Business layer usage:

  1. const Socket = require('ee-core').Socket;

because the socket.io package has been installed in ee-core, two objects are exposed to the user to prevent the user from repeatedly installing the socket.io package.
Official socket.io documentation: https://socket.io/, the version used in the framework: 4.4.1

Socket.IoServer

  • introduction: Server

    1. # This object is equal to
    2. Socket.IoServer = require('socket.io');

    Socket.IoClient

  • introduction: Client

    1. # This object is equal to
    2. Socket.IoClient = require('socket.io-client');