Why is Net.Socket.Write() not sending the full string to my TCP client?

Everything else works fine. The server is well aware of the usernames associated with the clients and it sends information to them accordingly, but the weird thing is the string cuts off after the first variable. Here is the loop for a typical send message:

function SendMessage(msg, client)
{

    const clientName = ClientNames.get(client);
    let recieverMsg = `${clientName}: ${msg}`;

    console.log(recieverMsg);


    Clients.forEach(elm => {
        if(elm != client)
        {
            elm.write(recieverMsg);
        }
        else {
            elm.write("You: " + msg);
        }
    })

}

msg is the chunk.toString() in the socket.on(‘data’) event, again, node picks up what this string means, it debugs fine but in the client (imagine the windows cmd) itll just print the username and go to the next line.

The loop for the client side is pretty simple too,

char buff[4090];

do
    {
        ZeroMemory(buff, 4090);
        int messageRevieved = recv(sock, buff, 4090, 0);

        if (messageRevieved > 0)
        {
            userInput->FreezeInput();
            cout << buff << endl;
            userInput->UnFreezeInput();
        }

    } while (0 == 0);

User input is handled in its own class on a seperate thread, again, working just fine.

I think it has to do with a misunderstanding of what socket.write and recv actually do or maybe I just dont understand javascript strings enough. Either way this problem is annoying because its the last step in creating my app

Ive done some extensive tests too, it really just doesnt like the concat strings. Itll print everything up until the first variable, meaning I could have socket.write(“hehehehehehe ” + variable1 + ” kadjgkdgad”); and it would print hehehehehe [variable1 value] and just stop

Tl;dr: The server will write to the sockets up to the first variable in a concat’d string and then stop, its so weird.

EDIT: The dependencies used serverside are Net and dotnet if that makes a difference.