Commit 396a507b authored by Dennis Willers's avatar Dennis Willers 🏀

add \n so a line ends

parent ee209935
Pipeline #415 passed with stages
in 2 minutes and 42 seconds
......@@ -74,7 +74,7 @@ server.on('connection',function(socket){
.then(res => {
console.log('Prepare: ', res.headers, res.data);
//echo data
var is_kernel_buffer_full = socket.write('FROMSERVER: ' + JSON.stringify(res.headers) + JSON.stringify(res.data));
var is_kernel_buffer_full = socket.write(JSON.stringify(res.headers) + JSON.stringify(res.data) + '\n');
if(is_kernel_buffer_full){
console.log('Data was flushed successfully from kernel buffer i.e written successfully!');
}else{
......@@ -217,7 +217,7 @@ client.on('data',function(data){
// 87.78.129.86
const clients = net.connect({host: 'localhost', port: 3000}, () => {
/*onst clients = net.connect({host: 'localhost', port: 3000}, () => {
console.log('connected to server!');
clients.write('Hello World Client!\r\n');
//test(clients);
......@@ -232,7 +232,7 @@ clients.on('data', (data) => {
});
//*/
async function test(clients) {
/*async function test(clients) {
let i = 0;
while (true) {
await new Promise(resolve => setTimeout(resolve, 5000));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment