17 lines
196 B
Go
17 lines
196 B
Go
package peer
|
|
|
|
import "time"
|
|
|
|
type Session struct {
|
|
Conn Connection
|
|
Time time.Time
|
|
}
|
|
|
|
func NewSession(conn Connection) *Session {
|
|
s := &Session{
|
|
Conn: conn,
|
|
Time: time.Now(),
|
|
}
|
|
return s
|
|
}
|