diff --git a/sse/be/be b/sse/be/be index a241f47..486fd13 100755 Binary files a/sse/be/be and b/sse/be/be differ diff --git a/sse/be/main.go b/sse/be/main.go index 49596f1..49fe3da 100644 --- a/sse/be/main.go +++ b/sse/be/main.go @@ -5,6 +5,7 @@ import ( "fmt" "io" "log" + "net/http" "slices" "strconv" "strings" @@ -136,6 +137,9 @@ func (e *Event) SendMessage(c *gin.Context) { Event: "message", Data: "Ciao", }) + e.Send(Message{ + Data: "Senza event", + }) } func (e *Event) SendMsg(c *gin.Context) { @@ -143,6 +147,7 @@ func (e *Event) SendMsg(c *gin.Context) { Event: "msg", Data: "hello", }) + c.JSON(http.StatusOK, gin.H{"status": "msg"}) } func (e *Event) SendPing(c *gin.Context) { @@ -150,7 +155,7 @@ func (e *Event) SendPing(c *gin.Context) { Event: "ping", Data: "Ping", }) - + c.JSON(http.StatusOK, gin.H{"status": "ping"}) } func (e *Event) SendPong(c *gin.Context) { @@ -158,6 +163,7 @@ func (e *Event) SendPong(c *gin.Context) { Event: "pong", Data: "Pong", }) + c.JSON(http.StatusOK, gin.H{"status": "pong"}) } func remove(slice []Client, s *Client) []Client { diff --git a/sse/be/static/_app/version.json b/sse/be/static/_app/version.json index ada3707..aaa0c28 100644 --- a/sse/be/static/_app/version.json +++ b/sse/be/static/_app/version.json @@ -1 +1 @@ -{"version":"1704556541085"} \ No newline at end of file +{"version":"1704628342008"} \ No newline at end of file diff --git a/sse/be/static/_app/version.json.br b/sse/be/static/_app/version.json.br index 146aaa1..6bab217 100644 Binary files a/sse/be/static/_app/version.json.br and b/sse/be/static/_app/version.json.br differ diff --git a/sse/be/static/_app/version.json.gz b/sse/be/static/_app/version.json.gz index 0596cbf..061ee42 100644 Binary files a/sse/be/static/_app/version.json.gz and b/sse/be/static/_app/version.json.gz differ diff --git a/sse/be/static/index.html b/sse/be/static/index.html index 4151202..33ae426 100644 --- a/sse/be/static/index.html +++ b/sse/be/static/index.html @@ -5,17 +5,17 @@ - + - - + +