//
connection.invoke("GetTotalLength", "value1");
//
//
connection.invoke("GetTotalLength", { param1: "value1" });
//
//
connection.invoke("GetTotalLength", { param1: "value1", param2: "value2" });
//
//
connection.on("ReceiveMessage", (req) => {
appendMessageToChatWindow(req.message);
});
//
//
connection.on("ReceiveMessage", (req) => {
let message = req.message;
if (req.sender) {
message = req.sender + ": " + message;
}
appendMessageToChatWindow(message);
});
//
//
connection.invoke("SendMessage", message);
//