作者 yangfu

ws test

@@ -63,7 +63,7 @@ func WebSocketClient(t *testing.T){ @@ -63,7 +63,7 @@ func WebSocketClient(t *testing.T){
63 } 63 }
64 64
65 for i:=1;i<=num;i++{ 65 for i:=1;i<=num;i++{
66 - u :=url.URL{Scheme:"ws",Host:"127.0.0.1:8080",Path:"/join"} 66 + u :=url.URL{Scheme:"ws",Host:"127.0.0.1:8080",Path:"/upgrage"}
67 requestHeader :=http.Header{} 67 requestHeader :=http.Header{}
68 requestHeader.Add("uid",fmt.Sprintf("%d",i)) 68 requestHeader.Add("uid",fmt.Sprintf("%d",i))
69 requestHeader.Add("appid",fmt.Sprintf("%d",2)) 69 requestHeader.Add("appid",fmt.Sprintf("%d",2))
@@ -16,7 +16,7 @@ import ( @@ -16,7 +16,7 @@ import (
16 16
17 func Test_RunWebSocket(t *testing.T) { 17 func Test_RunWebSocket(t *testing.T) {
18 //InitWebsocketConnmgrs(10) 18 //InitWebsocketConnmgrs(10)
19 - //http.HandleFunc("/join",join) 19 + //http.HandleFunc("/upgrade",join)
20 //http.HandleFunc("/",home) 20 //http.HandleFunc("/",home)
21 // 21 //
22 //go TimerSendData() 22 //go TimerSendData()