code: func NewServer(addr string, opts ...ServerOption) *Server {
  	sopts := &serverOptions{}
  	for _, opt := range opts {
  		opt(sopts)
  	}
  	sopts.adjust()
  
  	s := &Server{
  		addr:        addr,
  		sessionMaps: make(map[int]*sessionMap, sopts.sessionBucketSize),
  		opts:        sopts,
  
  		stopOnce: &sync.Once{},
  		startCh:  make(chan struct{}, 1),
  	}
  
  	for i := 0; i < sopts.sessionBucketSize; i++ {
  		s.sessionMaps[i] = &sessionMap{
  			sessions: make(map[interface{}]IOSession),
  		}
  	}
  
  	return s
  }
docs: // NewServer create server