* Returns a socket object. If it doesn't exist, it's created. * It also registers the notification callback. * @returns {MMSocket} a socket object
()
| 235 | * @returns {MMSocket} a socket object |
| 236 | */ |
| 237 | socket () { |
| 238 | if (typeof this._socket === "undefined") { |
| 239 | this._socket = new MMSocket(this.name); |
| 240 | } |
| 241 | |
| 242 | this._socket.setNotificationCallback((notification, payload) => { |
| 243 | this.socketNotificationReceived(notification, payload); |
| 244 | }); |
| 245 | |
| 246 | return this._socket; |
| 247 | } |
| 248 | |
| 249 | /** |
| 250 | * Retrieve the path to a module file. |
no test coverage detected