10 lines
257 B
JavaScript
Raw Permalink Normal View History

2025-04-23 09:34:08 +08:00
function init(connection) {
return function(message) {
if (message === 'big') {
return Promise.resolve(Buffer.alloc(30 * 1024 * 1024, 42));
}
return Promise.resolve('sent ' + message + ' to ' + connection);
};
}
module.exports = init;