code: func DialWebsocket(uri string, cfg *config.Config) (*WebsocketSession, error) {
  	u, err := url.Parse(uri)
  	if err != nil {
  		return nil, err
  	}
  
  	h := http.Header{
  		"Origin": {u.Scheme + "://" + u.Host},
  	}
  
  	serverID := threeDigits()
  	sessionID := utils.RandomString(20)
  
  	u = makeWebsocketURL(u, serverID, sessionID)
  
  	conn, _, err := cfg.Websocket.Dial(u.String(), h)
  	if err != nil {
  		return nil, err
  	}
  
  	session := NewWebsocketSession(conn)
  	session.id = sessionID
  	session.req = &http.Request{
  		URL:    u,
  		Header: h,
  	}
  
  	return session, nil
  }
docs: // DialWebsocket establishes a SockJS session over a websocket connection.
  //
  // Requires cfg.Websocket to be a valid client.