-
Notifications
You must be signed in to change notification settings - Fork 0
Sockets
Ivaylo Ivanov edited this page Jan 16, 2016
·
3 revisions
Defined in Esrol-servers and implemented in Esrol-server-app
The sockets component allows you to handle sockets from different types of servers. Each handle must export onRequest method.
app/sockets/tcp/index.js
'use strict';
module.exports = class Index {
static onRequest(socket) {
// code
}
};app/sockets/udp/index.js
'use strict';
module.exports = class Index {
static onRequest(message, info) {
// code
}
};app/sockets/http-websocket/index.js
'use strict';
module.exports = class Index {
static onRequest(socket) {
// code
}
};