1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

implement mvc HandleError as requested at #1244

Former-commit-id: 58a69f9cffe67c3aa1bab5d9425c5df65e2367ed
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-04-16 18:01:48 +03:00
parent df3a68255c
commit 0d4d2bd3fa
13 changed files with 145 additions and 363 deletions

View File

@@ -51,7 +51,7 @@ func handleConnection(c websocket.Connection) {
// Read events from browser
c.On("chat", func(msg string) {
// Print the message to the console, c.Context() is the iris's http context.
fmt.Printf("%s sent: %s\n", c.Context().RemoteAddr(), msg)
fmt.Printf("[%s <%s>] %s\n", c.ID(), c.Context().RemoteAddr(), msg)
// Write message back to the client message owner with:
// c.Emit("chat", msg)
// Write message to all except this client with: