discord.js message not defined (nodejs How to fix this issue what i have) : Before i ask this question i checked into simlar overflow questions and could not find an answer to my question.

So this is what i want to do.
I get live data from a telnet connection, i get the data live in the console window.
In a line in my code i added read.match("MYDATA")
So if it gets my data it needs to send it into a discord message.. but i cant implement the  message.channel.send in it, because i need the main variable.. how can i solve it ?  


    const port = "11000";
	const host = "192.168.1.12";	
    var socket = net.createConnection(port, host);
    console.log('Socket created.');
    socket.on('data', function(data) , message{
    // Log the response from the HTTP server.
    console.log('' + data);
    var read = data.toString();
    if (read.match("DC,4043,100,0")) {
    console.log ("Connected to ");      //<--- this shows up fine in the log

    message.channel.send('enabled');   //<---- can't send to channel

    }
    }).on('connect', function() {
    // Manually write an HTTP request.
    socket.write("GET / HTTP/1.0\r\n\r\n");
    }).on('end', function() {
    console.log('DONE');
   
    });	
