测试ws
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"time"
|
||||
@@ -128,7 +129,7 @@ func (c *EventController) TestWebsocket() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer ws.Close()
|
||||
|
||||
fmt.Println("testrequest", utils.Format4Output(c.Ctx.Request, false))
|
||||
//将当前客户端放入map中
|
||||
clients[ws] = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user