Remove some redundancy in websocketconn naming.

Rename websocketconn.WebSocketConn to websocketconn.Conn, and
       websocketconn.NewWebSocketConn to websocketconn.New

Following the guidelines at
https://blog.golang.org/package-names#TOC_3%2e
This commit is contained in:
David Fifield 2020-01-28 00:54:26 -07:00
parent 5b01df9030
commit e47dd5e2b4
4 changed files with 13 additions and 13 deletions

View file

@ -52,7 +52,7 @@ additional HTTP listener on port 80 to work with ACME.
}
// Copy from WebSocket to socket and vice versa.
func proxy(local *net.TCPConn, conn *websocketconn.WebSocketConn) {
func proxy(local *net.TCPConn, conn *websocketconn.Conn) {
var wg sync.WaitGroup
wg.Add(2)
@ -107,7 +107,7 @@ func (handler *HTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
conn := websocketconn.NewWebSocketConn(ws)
conn := websocketconn.New(ws)
defer conn.Close()
// Pass the address of client as the remote address of incoming connection