code: func MaxStreamID(stype StreamType, numStreams uint64, pers Perspective) StreamID {
  	if numStreams == 0 {
  		return 0
  	}
  	var first StreamID
  	switch stype {
  	case StreamTypeBidi:
  		switch pers {
  		case PerspectiveClient:
  			first = 0
  		case PerspectiveServer:
  			first = 1
  		}
  	case StreamTypeUni:
  		switch pers {
  		case PerspectiveClient:
  			first = 2
  		case PerspectiveServer:
  			first = 3
  		}
  	}
  	return first + 4*StreamID(numStreams-1)
  }
docs: // MaxStreamID is the highest stream ID that a peer is allowed to open,
  // when it is allowed to open numStreams.