实现websocket基本功能

This commit is contained in:
刘祥超
2020-09-26 19:54:26 +08:00
parent fce13eccd6
commit ab7e08d3b1
6 changed files with 202 additions and 36 deletions

View File

@@ -0,0 +1,14 @@
package nodes
// 处理反向代理
func (this *HTTPRequest) doReverseProxy() {
// 判断是否为Websocket请求
if this.RawReq.Header.Get("Upgrade") == "websocket" {
this.doWebsocket()
return
}
// 普通HTTP请求
// TODO
}