session.go 196 B

12345678910111213141516
  1. package peer
  2. import "time"
  3. type Session struct {
  4. Conn Connection
  5. Time time.Time
  6. }
  7. func NewSession(conn Connection) *Session {
  8. s := &Session{
  9. Conn: conn,
  10. Time: time.Now(),
  11. }
  12. return s
  13. }