``` var StdMsg = require('stdmsg').default; let stdMsg = new StdMsg('me', 'you', inputStream, outputStream); ``` stdMsg.listen([option,] callback) ---
npm install @liuyuekeng/stdmsg```
var StdMsg = require('stdmsg').default;
let stdMsg = new StdMsg('me', 'you', inputStream, outputStream);
stdMsg.listen([option,] callback)
---
- option
exp.
``
stdMsg.listen({contentType: 'string'}, (err, data) => {
console.log(data);
});
stdMsg.send(payload[, option])
---
- payload
- option
contentType
exp.
```
stdMsg.send({a: 1}, {contentType: 'string'});