func (s *SessionListImpl) OnCloseExecute(session Session) {
	for _, handler := range s.onCloseList {
		handler(session)
	}
	s.Pull(session)
}
OnCloseExecute Execute close handler and pull session from list
Use if custom SessionList
package soso
import "sync"
var Sessions = NewSessionList()
type Session interface {
	ID() string
	Recv() ([]byte, error)
	Send(string) error
	Close(status uint32, reason string) error
	IsClosed() bool
}
type SessionList interface {
	Push(session Session, uid string) int
	Get(uid string) []Session
	GetUID(session Session) (uid string, exists bool)
	Pull(session Session) bool
	Size(uid string) int
	OnOpen(func(Session))
	OnClose(func(Session))
	OnOpenExecute(Session)
	OnCloseExecute(Session)
}
type SessionListImpl struct {
	sync.Mutex
	sessions map[string]string
	users    map[string][]Session
	onOpenList  []func(Session)
	onCloseList []func(Session)
}
func NewSessionList() SessionList {
	return &SessionListImpl{
		sessions: make(map[string]string),
		users:    make(map[string][]Session),
	}
}
func (s *SessionListImpl) Push(session Session, uid string) int {
	s.Lock()
	defer s.Unlock()
	Loger.Debugf("Push session %s for user %v", session.ID(), uid)
	sessions, ok := s.users[uid]
	if !ok {
		sessions = make([]Session, 0)
	}
	if _, ok := s.sessions[session.ID()]; !ok {
		s.users[uid] = append(sessions, session)
		s.sessions[session.ID()] = uid
	}
	Loger.Debugf("Session %s for user %v pushed, total %v", session.ID(), uid, len(s.users[uid]))
	return len(s.users[uid])
}
func (s *SessionListImpl) Get(uid string) []Session {
	s.Lock()
	defer s.Unlock()
	sessions, ok := s.users[uid]
	if !ok {
		sessions = make([]Session, 0)
	}
	return sessions
}
func (s *SessionListImpl) GetUID(session Session) (string, bool) {
	s.Lock()
	defer s.Unlock()
	if session == nil {
		return "", false
	}
	uid, exists := s.sessions[session.ID()]
	return uid, exists
}
func (s *SessionListImpl) Pull(session Session) bool {
	s.Lock()
	defer s.Unlock()
	uid, ok := s.sessions[session.ID()]
	if !ok {
		return false
	}
	Loger.Debugf("Pull session %s for user %v", session.ID(), uid)
	var found int
	for key, value := range s.users[uid] {
		if value.ID() == session.ID() {
			found = key
		}
	}
	s.users[uid] = append(s.users[uid][:found], s.users[uid][found+1:]...)
	delete(s.sessions, session.ID())
	Loger.Debugf("Session %s for user %v pulled, total %v", session.ID(), uid, len(s.users[uid]))
	return true
}
func (s *SessionListImpl) Size(uid string) int {
	s.Lock()
	defer s.Unlock()
	sessions, ok := s.users[uid]
	if !ok {
		return 0
	}
	return len(sessions)
}
func (s *SessionListImpl) OnOpen(handler func(session Session)) {
	s.onOpenList = append(s.onOpenList, handler)
}
func (s *SessionListImpl) OnClose(handler func(session Session)) {
	s.onCloseList = append(s.onCloseList, handler)
}
func (s *SessionListImpl) OnOpenExecute(session Session) {
	for _, handler := range s.onOpenList {
		handler(session)
	}
}