remove unused ban endpoint.

This commit is contained in:
Miroslav Šedivý 2020-11-16 22:21:21 +01:00
parent d87a10b23a
commit 570efbf3a6
8 changed files with 0 additions and 95 deletions

View file

@ -2,7 +2,6 @@ package websocket
import (
"encoding/json"
"strings"
"sync"
"github.com/gorilla/websocket"
@ -12,22 +11,11 @@ import (
type WebSocketCtx struct {
session types.Session
address string
ws *WebSocketManagerCtx
connection *websocket.Conn
mu sync.Mutex
}
func (socket *WebSocketCtx) Address() string {
//remote := socket.connection.RemoteAddr()
address := strings.SplitN(socket.address, ":", -1)
if len(address[0]) < 1 {
return socket.address
}
return address[0]
}
func (socket *WebSocketCtx) Send(v interface{}) error {
socket.mu.Lock()
defer socket.mu.Unlock()