Commit f4c9378c authored by Dennis Willers's avatar Dennis Willers
Browse files

for test reason set socket client timeout at 60 seconds

parent 9622a83d
Loading
Loading
Loading
Loading
+2 −2
Changes for socket.js: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ server.on('connection',function(socket){

    socket.setEncoding('utf8');

    socket.setTimeout(800000,function(){
    socket.setTimeout(60000,function(){
        // called after timeout -> same as socket.on('timeout')
        // it just tells that soket timed out => its ur job to end or destroy the socket.
        // socket.end() vs socket.destroy() => end allows us to send final data and allows some i/o activity to finish before destroying the socket
@@ -254,7 +254,7 @@ client.on('data',function(data){

// 87.78.129.86  | localhost

const testClient = net.connect({host: 'localhost', port: 3000}, () => {
/*const testClient = net.connect({host: '87.78.129.86', port: 3201}, () => {
    console.log('connected to server!');
    //testClient.write('Hello World Client!\r\n');
    testClient.write(JSON.stringify({"mapId":"7fsfRSUCQ7YwfBEdRk_GivW6qzj","userId":"aKBNg9fbReqLedLiz1KFfA","name":"Summer 2021 - 01"}));