Checkout Source Code
Run Matlab Server in one Terminal
$matlab -nodisplay
host='localhost';
port=5000;
s = server(host, port);
s.receive();
s.send('This is MatLab');
s.send('This is MatLab');
This is NodeJS
This is NodeJS
This is NodeJS
Run NodeJS client in another Terminal
$node
client = require('./client');
host='localhost';
port=5000;
c = new client(host, port);
c.receive();
This is MatLab
This is MatLab
c.send('This is NodeJS\n');
c.send('This is NodeJS\n');
c.send('This is NodeJS\n');