code: func NewServer(o ...Options) *Server {
  	// Get or create the options.
  	var options *Options
  	if len(o) > 0 {
  		options = &o[0]
  	} else {
  		options = &Options{}
  	}
  
  	// Set the default option values for unset values.
  	options.SetDefaults()
  
  	// Create a new backend server.
  	bs := backend.NewServer(len(options.HTTPHandleURL), options.EnableCORS, options.CheckOrigin)
  
  	// Create a new server value.
  	s := &Server{
  		bs:          bs,
  		options:     options,
  		onNewSocket: func(*Socket) {}, // Initialize with dummy function to remove nil check.
  		sockets:     make(map[string]*Socket),
  	}
  
  	// Set the backend server event function.
  	bs.OnNewSocketConnection(s.handleOnNewSocketConnection)
  
  	return s
  }
docs: // NewServer creates a new glue server instance.
  // One variadic arguments specifies the server options.