123456789101112131415161718192021222324 |
- 'use strict'
- var net = require('net');
- var r2mConsts = require('./Header.js');
- class R2m_Socket {
- constructor(host, port) {
- this.host = host || 'localhost';
- this.port = port || 9090;
- }
- open() {
- if (!this.client) {
- this.client = net.connect({port:this.port, host:this.host});
- }
- return this.client;
- }
- }
- module.exports = R2m_Socket;
|