diff --git a/TrafficLightsSignalR/Hubs/LightHub.cs b/TrafficLightsSignalR/Hubs/LightHub.cs
index b95aa95..2c7329e 100644
--- a/TrafficLightsSignalR/Hubs/LightHub.cs
+++ b/TrafficLightsSignalR/Hubs/LightHub.cs
@@ -8,11 +8,6 @@ namespace TrafficLightsSignalR.Hubs
{
private readonly ITrafficLightStateService _stateService = stateService;
- public async Task SendMessage(string user, string message)
- {
- await Clients.All.SendAsync("ReceiveMessage", user, message);
- }
-
public async Task GetServerState(string connectionId)
{
Debug.WriteLine("ServerBroadcast called...");
diff --git a/TrafficLightsSignalR/Pages/Index.cshtml b/TrafficLightsSignalR/Pages/Index.cshtml
index 9ac2524..9069c57 100644
--- a/TrafficLightsSignalR/Pages/Index.cshtml
+++ b/TrafficLightsSignalR/Pages/Index.cshtml
@@ -33,36 +33,5 @@
-
-
diff --git a/TrafficLightsSignalR/wwwroot/js/lights.js b/TrafficLightsSignalR/wwwroot/js/lights.js
index 3341fea..0cddfe7 100644
--- a/TrafficLightsSignalR/wwwroot/js/lights.js
+++ b/TrafficLightsSignalR/wwwroot/js/lights.js
@@ -10,15 +10,6 @@ var connection = new signalR.HubConnectionBuilder().withUrl("/lightHub").build()
//Disable the send button until connection is established.
document.getElementById("sendButton").disabled = true;
-connection.on("ReceiveMessage", function (user, message) {
- var li = document.createElement("li");
- document.getElementById("messagesList").appendChild(li);
- // We can assign user-supplied strings to an element's textContent because it
- // is not interpreted as markup. If you're assigning in any other way, you
- // should be aware of possible script injection concerns.
- li.textContent = `${user} says ${message}`;
-});
-
connection.on("ReceiveStateUpdate", function (stateData) {
console.log("Update pushed.");
updateView(stateData);
@@ -30,7 +21,6 @@ connection.on("ReceiveServerState", function (stateData) {
});
connection.start().then(function () {
- document.getElementById("sendButton").disabled = false;
connection.invoke("GetServerState", connection.connectionId).catch(function (err) {
return console.error(err.toString());
});