mirror of
https://github.com/xuxiaobo-bobo/boda_jsEnv.git
synced 2025-04-22 23:44:23 +08:00
10 lines
257 B
JavaScript
10 lines
257 B
JavaScript
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;
|