first commit
This commit is contained in:
19
pkg/websocket/client/service/peer.go
Normal file
19
pkg/websocket/client/service/peer.go
Normal file
@ -0,0 +1,19 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/gorilla/websocket"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Session struct {
|
||||
Conn *websocket.Conn
|
||||
Time time.Time
|
||||
}
|
||||
|
||||
func NewSession(conn *websocket.Conn) *Session {
|
||||
s := &Session{
|
||||
Conn: conn,
|
||||
Time: time.Now(),
|
||||
}
|
||||
return s
|
||||
}
|
Reference in New Issue
Block a user