1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-19 02:47:04 +00:00

use the same connection structure for both client and server-side connections interfaces, the 'Connection' interface could be changed to 'ServerConn' but this would produce breaking naming change to the iris users, so keep it as it's.

Former-commit-id: 3440871b368709e33d2d2a5080c66f7ad9338970
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-02-10 17:16:43 +02:00
parent 280872fd59
commit 946c100f7d
5 changed files with 258 additions and 296 deletions

View File

@@ -11,8 +11,6 @@ import (
func main() {
app := iris.New()
ws := websocket.New(websocket.Config{})
app.Get("/socket", ws.Handler())
ws.OnConnection(func(c websocket.Connection) {
go func() {
<-time.After(20 * time.Second)
@@ -28,5 +26,7 @@ func main() {
})
})
app.Get("/socket", ws.Handler())
app.Run(iris.Addr(":8080"))
}