mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-24 06:27:09 +02:00
remove unused ban endpoint.
This commit is contained in:
parent
d87a10b23a
commit
570efbf3a6
8 changed files with 0 additions and 95 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue